﻿.sitemap {
    font-family: sans-serif;
    line-height: 1.8;
    text-align: center;
}

.sitemap ul {
    list-style: none;
    padding-left: 20px;
}

.sitemap li {
    position: relative;
}

.sitemap a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.sitemap a:hover {
    color: #007bff;
}

/* --- PIRATE MAP STYLES --- */

.sitemap-container {
    position: relative;
    width: 100%; /* Make container take full width of its parent */
    max-width: 1200px; /* But don't let it get too big on desktops */
    margin: 20px auto; /* Center the container */
    aspect-ratio: 1200 / 818; /* Crucial for maintaining proportions */
}

.map-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures image fits perfectly inside the aspect-ratio box */
}

.map-link {
    position: absolute;
    transform: translate(-50%, -50%); /* Centers the link on its coordinates */
    /* == THIS IS THE KEY TO RESPONSIVENESS == */
    font-size: clamp(0.6rem, 1.5vw, 1.1rem);
    padding: clamp(3px, 1vw, 8px) clamp(6px, 1.5vw, 12px);
    /* ======================================= */

    background-color: rgba(46, 31, 22, 0.75);
    color: #f3e9d2;
    border: 1px solid #c8a37e;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'IM Fell English SC', serif;
    text-align: center;
    white-space: nowrap;
    text-shadow: 1px 1px 2px #000;
    transition: transform 0.2s ease-out, background-color 0.2s, box-shadow 0.2s;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.map-link:hover,
.map-link:focus {
    transform: translate(-50%, -50%) scale(1.15);
    background-color: rgba(186, 24, 24, 0.85);
    color: #fff;
    z-index: 10;
    cursor: pointer;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.6);
}

/* --- Link Positions (These remain the same) --- */
#link-home {
    top: 76%;
    left: 94%;
}

#link-specialties {
    top: 38%;
    left: 42%;
}

#link-news {
    top: 55%;
    left: 83%;
}

#link-contacts {
    top: 29%;
    left: 88%;
}

#link-gallery {
    top: 15%;
    left: 17%;
}

#link-documents {
    top: 85%;
    left: 32%;
}

#link-map {
    top: 54%;
    left: 39%;
}

/* A single media query for the smallest screens to allow text wrapping */
@@media (max-width: 480px) {
    .map-link {
        white-space: normal;
        min-width: 50px; /* prevent it from becoming too narrow */
    }
}