@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    font-family: "Montserrat", sans-serif;
    text-decoration: none;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

header a {
    color: black;
    font-size: 22px;
}

header a:hover {
    text-decoration: underline !important;
}

header div:nth-child(2) {
    position: relative;
    width: 25%;
}

header div:nth-child(2) p {
    position: absolute;
    top: 5px;
    right: 18px;
    font-size: 20px;
}

header div:nth-child(2) input,
header select {
    padding: 10px;
    border: 2px solid gainsboro;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

header div:nth-child(2) input {
    width: 100%;
    font-size: 15px;
    border-radius: 30px;
}

header select {
    width: 15%;
    font-size: 15px;
    border-radius: 10px;
}

main {
    padding: 40px;
}

main .items {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    width: 95%;
    margin: 0 auto;
}

main .items .item {
    padding: 10px;
    width: 22%;
    text-align: center;
    border: 2px solid gainsboro;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    margin-bottom: 10px;
}

main .items .item>div:first-child {
    width: 50%;
    margin: 0 auto;
}

main .items .item>div:first-child img {
    width: 100%;
}

main .items .item button {
    padding: 10px;
    width: 100%;
    font-size: 17px;
    border: 2px solid gainsboro;
    border-radius: 30px;
    background-color: white;
    transition: 0.2s;
    cursor: pointer;
    margin: 10px 0px;
}

main .items .item button:hover {
    background-color: gainsboro;
    border: 2px solid gold;
}

main .items .item h2 {
    font-size: 20px;
    margin: 13px 0px 10px;
}

main .items .item span {
    font-size: 20px;
}

.clicked {
    color: orangered;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    border-radius: 10px;
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 60%;
}

.close {
    color: #aaaaaa;
    font-size: 35px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-content>div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
}

.modal-content>div:nth-child(2) {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.modal-content>div:nth-child(2) img {
    box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 40px;
    width: 25%;
}

.modal-content>div:nth-child(2) div {
    width: 55%;
}

.modal-content>div:nth-child(2) div p {
    margin-bottom: 10px;
}

@media (max-width:1200px) {
    main .items .item {
        width: 30%;
    }
}

@media (max-width:1050px) {
    header a {
        font-size: 19px;
    }

    .modal-content {
        width: 80%;
    }

    header div:nth-child(2) {
        width: 20%;
    }

    header select {
        width: 18%;
    }
}

@media (max-width:900px) {
    main .items .item button {
        padding: 7px;
        font-size: 14px;
        margin: 5px 0px;
    }

    main .items .item span {
        font-size: 17px;
    }

    main .items .item h2 {
        font-size: 16px;
    }

    main .items .item>div:first-child {
        width: 55%;
    }

    header div:nth-child(2) p {
        display: none;
    }

    header div:nth-child(2) {
        width: 16%;
    }
}

@media (max-width:850px) {
    .modal-content>div:last-child {
        flex-direction: column;
        margin-top: 10px;
    }

    .modal-content>div:last-child img {
        text-align: center;
        margin: 0px auto;
        width: 35%;
    }

    .modal-content>div:nth-child(2) div {
        width: 100%;
        margin-top: 20px;
    }

    .modal-content {
        width: 90%;
    }

    header {
        padding: 15px 10px;
    }

    main .items .item {
        width: 45%;
    }
}

@media (max-width:600px) {
    .modal-content>div:last-child img {
        width: 55%;
    }

    main .items {
        width: 100%;
    }
}

@media (max-width:520px) {
    main .items .item {
        width: 90%;
    }

    main .items {
        justify-content: center;
    }

    main .items .item h2 {
        font-size: 20px;
    }

    main .items .item button {
        font-size: 17px;
    }
}

@media (max-width:400px) {
    .modal-content>div:last-child img {
        width: 75%;
    }
}

@media (max-width: 790px) {
    header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    header a {
        font-size: 18px;
        text-align: center;
    }

    header div:nth-child(2) {
        width: 100%;
    }

    header div:nth-child(2) p {
        right: 15px;
        top: 8px;
    }

    header div:nth-child(2) input {
        font-size: 14px;
        padding: 8px 12px;
    }

    header select {
        width: 100%;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px;
    }

    header a {
        font-size: 16px;
    }

    header div:nth-child(2) p {
        font-size: 16px;
    }

    header select {
        font-size: 13px;
        padding: 8px;
    }
}