* {
    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;
}


h1 {
    text-align: center;
}

.paragraph-box {
    background-color: #bc8168;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
    max-width: 1000px;
    margin: auto;
    margin-bottom: 10px;
}

.paragraph-box p {
    font-size: 20px;
    text-align: justify;
    color: #ffffff;
}

.gallery-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

.gallery-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-width: 300px;
    /* Prevents sections from becoming too narrow */
}

.gallery-section.full-width {
    flex-basis: 100%;
    width: 100%;
}

.photo-group {
    display: flex;
    gap: 20px;
    width: 100%;
}

.photo-box {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex: 1;
    height: 250px;
}

.photo-box.vertical {
    height: 400px;
}

.photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.description {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    background-color: rgba(251, 234, 214, 0.9);
    color: #5b2c2c;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    transition: bottom 0.4s ease;
}

.photo-box:hover .description {
    bottom: 0;
}

.photo-box:hover img {
    transform: scale(1.05);
}

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) {
    .gallery-container {
        max-width: 1400px;
    }

    .gallery-section {
        gap: 25px;
    }

    .photo-box {
        height: 280px;
    }

    .photo-box.vertical {
        height: 450px;
    }
}

/* For desktops */
@media only screen and (max-width: 1280px) and (min-width: 769px) {
    .photo-group {
        flex-wrap: wrap;
    }

    .photo-box {
        flex: 1;
        min-width: 250px;
    }
}

/* For tablets */
@media only screen and (max-width: 768px) and (min-width: 481px) {
    .gallery-section {
        flex: 100%;
    }

    .photo-group {
        flex-wrap: wrap;
    }

    .photo-box {
        flex: 1;
        min-width: 200px;
        height: 220px;
    }

    .photo-box.vertical {
        height: 350px;
    }
}

/* For mobile phones */
@media only screen and (max-width: 480px) {
    .gallery-container {
        padding: 10px;
    }

    .photo-group {
        flex-direction: column;
    }

    .photo-box,
    .photo-box.vertical {
        height: 200px;
    }

    .description {
        font-size: 12px;
    }
}