/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cantarell:ital,wght@0,400;0,700;1,400;1,700&family=Protest+Guerrilla&display=swap');

/* Colors */
:root {
    --color-1: #d9e7e8;

    --color-2: #f8f5e6;

    --color-3: #2c5f8a;

    --color-4: #8b6b2e;

    --color-5: #d9901a;

    --color-6: #111111;
    --color-7: #D0D0D0;
}


/* Styling */
body {
    background-color: var(--color-1);
    font-family: 'Cantarell', sans-serif;
    margin: 10px 0 0 0;
    zoom: 90%
}

header h1 {
    font-family: 'Protest Guerrilla', sans-serif;
    background-color: var(--color-3);
    color: var(--color-6);
    width: fit-content;
    margin: 0 auto;
    padding: 15px 40px;
    border: 3px solid var(--color-6);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, .2);
}

footer h4 {
    font-family: 'Protest Guerrilla', sans-serif;
    background-color: var(--color-3);
    max-width: 50%;
    text-align: center;
    padding: 10px;
    color: var(--color-6);
}

/* Dropdown */
.dropdown {
    position: relative;

}

.dropdown-arrow {
    position: absolute;
    top: 10px;
    right: 25px;
}

.dropdown>.flagImg {
    position: absolute;
    top: 10px;
    right: 25px;
    height: 60px;
}

.dropdown-content a {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 6px 0 0 0;
}

.dropdown-content .flagImg {
    height: 60px;
    display: block;
}

.dropdown-content {
    display: none;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 70px;
    right: 25px;
    background: var(--color-2);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover .dropdown-content {
    display: block;
}

.dropdown-content a:hover {
    transform: scale(1.1);
}


/* Grid */
.container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: min-content min-content min-content;
    grid-template-areas:
        "header"
        "content"
        "footer";
    max-width: 1800px;
    margin: auto
}

header {
    grid-area: header;
}


footer {
    grid-area: footer;
}

#content {
    display: grid;
    grid-template-columns: 2fr, 1fr;
    grid-template-rows: min-content;
    grid-template-areas:
        "map info";
    gap: 30px;
    align-items: start;
    max-width: 1600px;
    margin: auto;
    margin-top: 10px;
}

main {
    display: flex;
    grid-area: map;
    align-items: center;
    flex-direction: column;
}

#sidebar {
    width: 550px;
    background-color: var(--color-2);
    border: 3px solid var(--color-6);
    box-shadow: 6px 6px 15px rgba(0, 0, 0, .15);
    position: sticky;
    top: 10px;
}

/* Map */
svg .region:hover,
svg .land:hover,
svg .circle:hover {
    filter: brightness(1.2)
}

.visited,
.visited path {
    fill: var(--color-5) !important;
}

#map {
    max-width: 950px;
    width: 100%;
    margin: 0 auto;

    /* 1. Use flex centering to force the container to shrink-wrap its content */
    display: flex;
    justify-content: center;
    align-items: center;
}

#map svg {
    width: 100%;
    /* 2. Cap the height strictly on the SVG element itself */
    max-height: 600px;

    /* 3. Tell the width to automatically scale down if the height hits 600px */
    height: auto;
    display: block;
}

.credit {
    margin-top: 10px;
    font-size: xx-small;
}

/* Legend */
#legend {
    display: flex;
    flex-direction: column;
    width: max-content;
    height: min-content;
    background-color: var(--color-2);
    border: 2px solid var(--color-6);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, .1);
}

#legend h4 {
    font-family: 'Protest Guerrilla', sans-serif;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: var(--color-4);
    color: var(--color-6);
    margin: 0;
}

#legend>div {
    display: flex;
    align-items: center;
}

.legendContent>div {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
}

.desc {
    width: 200px;
    text-align: center;
    margin: auto;
}

.visitedBox,
.unvisitedBox {
    width: 20px;
    height: 20px;
    border-style: solid;
    display: inline-block;
}

.visitedBox {
    background-color: var(--color-5);
}

.unvisitedBox {
    background-color: lightgray;
}

/* Sidebar */

#sidebar {
    width: 500px;
    background-color: var(--color-2);
    font-family: Georgia, "Times New Roman", serif;
    position: sticky;
    top: 5px;
}

#sidebarContent {
    text-align: center;
}

#sidebar h1 {
    text-transform: uppercase;
    text-align: center;
    margin: 0;
    padding: 20px 10px 10px;
    font-size: 2rem;
    border-bottom: 2px solid var(--color-6);
    letter-spacing: 1px;
}

#sidebar .subhead {
    border-bottom: 4px solid var(--color-6);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0;
    margin: 0;
}

#sidebar h2 {
    text-transform: uppercase;
    font-style: italic;
    text-align: center;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

#sidebar h3 {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 20px;
}

#sidebar img {
    max-width: 350px;
    max-height: 350px;
    border: 2px solid var(--color-6);
    margin-bottom: 25px;
    object-fit: contain;
}

.infoCard {
    padding: 0 0 40px 0;
}

/* Button */
#toggleSidebar {
    display: none;
    position: absolute;
    top: 5px;
    right: 5px;
    height: 28px;
    width: 28px;
    text-align: center;
}