* {
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    background: linear-gradient(to bottom, #F2E1C1, #F7B7B7);
}

header {
    background-color: #bc8168;
    padding: 10px;
}

.menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    margin: auto;
}

.logo {
    width: 10%;
}

.logo img {
    width: 100%;
}

.menu-item {
    width: 20%;
    background-color: rgb(255, 198, 154);
    color: black;
    padding-top: 5px;
    padding-bottom: 5px;
    text-align: center;
    border-radius: 34px;
}

.menu-item:hover {
    background-color: #ff9d64;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
}

.menu-item a {
    text-decoration: none;
    color: black;
}

.menu-item:hover a {
    color: white;
}

#sub-menu {
    width: 100%;
    display: none;
    position: absolute;
    top: 29px;
}

.sub-menu-item {
    border-bottom: solid white 1px;
    border-radius: 30px;
    width: 100%;
    background-color: #a54848;
    padding: 5px;
    text-align: center;
    color: white;

}

#projects {
    position: relative;
}

#projects:hover {
    color: white;
}

#projects:hover #sub-menu {
    display: block;
}

.parent {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: 20px;
    margin-right: 20px;
}

.child-box {
    background-color: rgb(255, 198, 154);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.left-align {
    text-align: left;

}

.right-align {
    text-align: right;
}

h1 {
    text-align: center;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 90%;
    margin: auto;
    margin-bottom: 20px;
}

.gallery-item {
    width: 24%;
    height: 200px;
    margin-bottom: 20px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    filter: grayscale(100%);
    transition: all 2s;
    border-radius: 8px;
    object-fit: cover;
}

.gallery-item img:hover {
    filter: grayscale(0%);
}

footer {
    background-color: #bc8168;
    text-align: center;
    padding: 15px;
    color: rgb(68, 44, 44);
    width: 100%;
}

/*for large screens*/
@media only screen and (min-width: 1280px) {
    .menu {
        flex-direction: row;
        gap: 20px;
    }
}

/*for desktops*/
@media only screen and (max-width: 1280px) and (min-width: 769px) {
    .menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/*for tablets*/
@media only screen and (max-width: 768px) and (min-width: 481px) {
    .menu {
        flex-direction: column;
        align-items: center;
    }

    .menu-item,
    .current {
        width: 80%;
        margin-bottom: 10px;
    }

    .gallery-item {
        width: 48%;
        margin-bottom: 20px;
    }
}

/*for mobile phones*/
@media only screen and (max-width: 480px) {
    .menu {
        flex-direction: column;
        background-color: #bc8168;
        width: 100%;
    }

    .menu-item,
    .current {
        width: 100%;
        margin-bottom: 10px;
    }

    #sub-menu {
        top: 25px;
    }

    .logo img {
        width: 70px;
    }

    .menu-item,
    .current {
        width: 100%;
        font-size: 14px;
        margin-bottom: 5px;
    }

    footer {
        font-size: 12px;
        text-align: center;
        padding: 20px;
    }

    .child-box {
        font-size: 15px;
    }

    .gallery {
        flex-direction: column;
        align-items: center;
    }

    .gallery-item {
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }

    .gallery-item img {
        height: auto;
        max-width: 100%;
    }
}