* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    min-height: 100vh;
    font-family: "Helvetica Neue", sans-serif;
    color: white;
}

/* Main container */

.container {
    width: min(1400px, 100%);
    min-height: 100vh;

    margin: auto;
    padding: 40px 24px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Search */

.inp {
    width: min(400px, 100%);

    padding: 16px 20px;

    border: none;
    border-radius: 12px;
    outline: none;

    background: #111;
    color: #fff;

    font-size: 16px;
}

.inp::placeholder {
    color: #777;
}

.inp:focus {
    box-shadow: 0 0 0 1px #333;
}

/* Cards container */

.cards {
    width: 100%;

    display: grid;

    grid-template-columns: repeat(
        auto-fit,
        minmax(200px, 1fr)
    );

    gap: 30px;

    justify-items: center;
}

/* Card */

.card {
    position: relative;

    width: 200px;
    height: 300px;

    overflow: hidden;

    border-radius: 28px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.6);
}

/* Main image */

.bg-img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

/* Blurred layer */

.blurred-layer {
    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    background-size: cover;
    background-position: bottom;

    filter: blur(10px);

    z-index: 1;

    mask-image:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 1),
            rgba(0, 0, 0, 0)
        );

    mask-size: 100% 100%;
    mask-repeat: no-repeat;

    -webkit-mask-image:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 1),
            rgba(0, 0, 0, 0)
        );

    -webkit-mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
}

/* Card content */

.content {
    position: absolute;

    left: 20px;
    right: 20px;
    bottom: 20px;

    color: white;

    z-index: 2;
}

.content h3 {
    font-size: 18px;
    font-weight: bold;

    margin-bottom: 6px;

    text-transform: capitalize;
}

.content p {
    font-size: 14px;

    color: #ddd;

    line-height: 1.4;
}

/* =========================
   TABLET
========================= */

@media (max-width: 900px) {

    .container {
        padding: 30px 20px;
        gap: 30px;
    }

    .cards {
        grid-template-columns:
            repeat(
                auto-fit,
                minmax(190px, 1fr)
            );

        gap: 24px;
    }

    .card {
        width: 190px;
        height: 285px;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .container {
        padding: 24px 16px;
        gap: 28px;
    }

    .inp {
        width: 100%;
        max-width: 400px;

        padding: 14px 16px;
        font-size: 15px;
    }

    .cards {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 16px;
    }

    .card {
        width: 100%;
        height: 260px;

        border-radius: 22px;
    }

    .content {
        left: 14px;
        right: 14px;
        bottom: 14px;
    }

    .content h3 {
        font-size: 16px;
    }

    .content p {
        font-size: 12px;
    }
}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 380px) {

    .container {
        padding: 20px 12px;
    }

    .cards {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .card {
        width: min(220px, 100%);
        height: 300px;
    }

    .content h3 {
        font-size: 17px;
    }

    .content p {
        font-size: 13px;
    }
}