body {
    display: flex;
    flex-direction: column;
    margin: 0;
}

main {
    display: block;
    padding: 0;
    margin: 0;
}

.title {
    font-weight: 900;
    margin-top: 1.5em;
    font-family: 'Judson';
    font-size: 3.5rem;
    padding-top: 5px;
}

.legend {
    display: flex;
    justify-content: right;
    gap: 15px;
    margin-right: 90px;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.7rem;
    color: rgb(51, 51, 51);
}

.legend-color {
    width: 20px;
    height: 20px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 8px;
}

.legend-color.category-arch { background-color: rgb(133, 92, 117); }
.legend-color.category-sculp { background-color: rgb(217, 175, 107); }
.legend-color.category-paint { background-color: rgb(175, 100, 89); }
.legend-color.category-lit { background-color: rgb(115, 111, 76); }
.legend-color.category-fresc { background-color: rgb(82, 106, 132); }

.map-list-wrapper {
    display: flex;
    flex-direction: row-reverse; 
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 20px;
}

.map-container {
    position: relative;
    flex: 4;
    min-width: 0;
    max-width: 100%;
    display: inline-block;
    text-align: center;
    margin-top: 14px;
}

.map-container img {
    width: 85%;
    height: auto;
    margin: 0;
    padding: 0;
    border: rgb(227, 219, 209);
}

.map-list-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
}

.artwork-list {
    flex: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: rgba(255, 255, 255, 0.5);
    padding: 1em;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-top: 25px;
    margin-left: 54px;
    box-sizing: border-box;
}

.artwork-list h2 {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 10px;
}

.artwork-list ol {
    padding-left: 20px;
}

.artwork-list li {
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.7;
}

.marker {
    position: absolute;
    width: 25px;
    height: 25px;
    color: rgb(255, 255, 255);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.category-arch   { background-color: rgb(133, 92, 117); }
.category-sculp  { background-color: rgb(217, 175, 107); }
.category-paint  { background-color: rgb(175, 100, 89); }
.category-lit    { background-color: rgb(115, 111, 76); }
.category-fresc  { background-color: rgb(82, 106, 132); }

.description-text {
    max-width: 90%;
    margin: 60px auto;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    text-align: justify;
}

.description-text p {
    margin-bottom: 15px;
}

.description-text a {
    color: rgb(151, 112, 96);
    text-decoration: none;
}

.description-text a:hover {
    text-decoration: underline;
}

#mpc  { color: rgb(175, 100, 89); font-weight: bold; }
#msc  { color: rgb(217, 175, 107); font-weight: bold; }
#mac  { color: rgb(133, 92, 117); font-weight: bold; }
#mlc  { color: rgb(115, 111, 76); font-weight: bold; }
#mfc  { color: rgb(82, 106, 132); font-weight: bold; }

/* ==== MEDIA QUERIES ==== */

@media (max-width: 600px) {
    .marker {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .legend-item {
        font-size: 0.8rem;
    }

    .legend-color {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 768px) {
    .map-list-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .map-container {
        width: 100%;
        margin-left: 0;
    }

    .artwork-list {
        width: 90%;
        max-width: 500px;
        margin: 20px auto;
        font-size: 0.9rem;
        padding: 10px;
    }

    .artwork-list li {
        font-size: 0.85rem;
    }

    .legend {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin: 10px 0;
        padding: 10px;
    }

    .description-text {
        width: 90%;
        max-width: 800px;
        margin: 20px auto;
        padding: 15px;
        font-size: 1rem;
    }
}