* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #f4f4f4;
    font-family: Arial, sans-serif;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    padding-bottom: 25px
}

header {
    background: #333;
    color: white;
    text-align: center;
    padding-top: 16px;
    width: 100%
}

header h1,
header p {
    margin: 4px
}

nav {
    margin-top: 16px;
    background: #444;
    display: flex;
    justify-content: center;
    gap: 40px
}

nav>a,
.dropdown>a {
    display: block;
    color: #d4e219;
    padding: 12px;
    text-decoration: none
}

.dropdown {
    position: relative
}

.menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #555;
    min-width: 150px;
    z-index: 10
}

.menu a {
    display: block;
    color: #e7ef58;
    padding: 8px;
    text-align: left
}

.dropdown:hover .menu {
    display: block
}

main {
    max-width: 1100px;
    margin: 25px auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px
}

article {
    background: white;
    padding: 14px;
    text-align: center;
    box-shadow: 0 2px 10px #0002;
    flex: 0 1 250px
}

article img {
    width: 100%;
    height: 180px;
    object-fit: cover
}

article h3 {
    font-size: 16px
}

article p {
    font-size: 14px
}

button {
    background: #28b15f;
    color: white;
    border: 0;
    padding: 8px 12px;
    border-radius: 4px
}

@media(max-width:850px) {
    main {
        grid-template-columns: repeat(2, 1fr)
    }

    article {
        flex-basis: 45%
    }
}

@media(max-width:480px) {
    main {
        grid-template-columns: 1fr
    }

    nav {
        gap: 4px;
        flex-wrap: wrap
    }

    article {
        flex-basis: 100%;
        max-width: 360px
    }
}