.body {
    display: flex;
    justify-content: center;
    align-items: center;
}
body, button, input, select, textarea, legend {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    font-style: normal;
    background-color: #f4f4f4;
}

/* MAIN CONTAINER */
.container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    height: 600px;
    width: 100%;
    background-color: #f4f4f4;
    padding: 20px;
    box-sizing: border-box;
    gap: 20px;
}

/* TITLE */
.page-title {
    width: 100%;
    font-size: 22px;
    font-family: 'Source Sans Pro', sans-serif;
    color: #030303;
    margin-bottom: 20px;
    margin-left: 45px;
}

/* MAP */
#map {
    width: 75%;
    height: 75%;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    margin-left: 22%
}

/* FILTERS */
.dropdown-container {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

.btn {
    background-color: #ffffff;
    padding: 10px 20px;
    border: solid 1px #666666;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    width: 170px;
    height: 60px;
    position: relative;
}

.btn:hover {
    background-color: #cbff00;
}

.btn:active {
    background-color: #cbff00;
}

/* MARKERS */
.marker-cluster-small {
    background-color: rgba(181, 226, 140, 0.6);
    border: 2px solid rgba(110, 204, 57, 0.5);
}

.marker-cluster-medium {
    background-color: rgba(241, 211, 87, 0.6);
    border: 2px solid rgba(240, 194, 12, 0.5);
}

.marker-cluster-large {
    background-color: rgba(253, 156, 115, 0.6);
    border: 2px solid rgba(241, 128, 23, 0.5);
}

.marker-cluster div {
    color: white;
}

/* Dropdown */
.btn .btn-text {
    font-size: 16px;
}

.arrow-dwn {
    display: flex;
    height: 15px;
    width: 15px;
    margin-left: 10px;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.btn.open .arrow-dwn {
    transform: rotate(-180deg);
}

.category-btn.open ~ #list-items-category {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation-name: fadeInUp;
    -webkit-animation-name: fadeInUp;
    animation-duration: 0.4s;
    animation-fill-mode: both;
    -webkit-animation-duration: 0.4s;
    -webkit-animation-fill-mode: both;
}

.city-btn.open ~ #list-items-city {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation-name: fadeInUp;
    -webkit-animation-name: fadeInUp;
    animation-duration: 0.4s;
    animation-fill-mode: both;
    -webkit-animation-duration: 0.4s;
    -webkit-animation-fill-mode: both;
}

.country-btn.open ~ #list-items-country {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation-name: fadeInUp;
    -webkit-animation-name: fadeInUp;
    animation-duration: 0.4s;
    animation-fill-mode: both;
    -webkit-animation-duration: 0.4s;
    -webkit-animation-fill-mode: both;
}

.year-btn.open ~ #list-items-year {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation-name: fadeInUp;
    -webkit-animation-name: fadeInUp;
    animation-duration: 0.4s;
    animation-fill-mode: both;
    -webkit-animation-duration: 0.4s;
    -webkit-animation-fill-mode: both;
}

.list-items {
    position: absolute;
    max-width: 400px;
    width: 130%;
    padding: 5px 0;
    margin: 0;
    background-color: #eeeeee;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    animation-name: fadeInDown;
    -webkit-animation-name: fadeInDown;
    animation-duration: 0.3s;
    animation-fill-mode: both;
    -webkit-animation-duration: 0.3s;
    -webkit-animation-fill-mode: both;
    overflow-y: scroll;
    max-height: 250px;
    z-index: 1100;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.list-items.open {
    visibility: visible;
    opacity: 1;
}

.list-items .item {
    display: flex;
    align-items: center;
    list-style: none;
    height: 50px;
    cursor: pointer;
    transition: 0.3s;
    padding: 0 5px;
    border-radius: 8px;
}

.list-items .item:hover {
    background-color: #f4f4f4;
}

.item .item-text {
    margin-right: 10px;
    font-size: 16px;
}

.pin-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.item {
    display: flex;
    align-items: center;
    list-style: none;
    height: 16px;
    width: 16px;
    cursor: pointer;
    transition: 0.3s;
    padding: 0 5px;
    border-radius: 8px;
}

.item .checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 16px;
    width: 16px;
    border-radius: 12px;
    border: 1.5px solid #666666;
    transform: all 0.3s ease-in-out;
    margin-right: 5px;
}

.items.checked .checkbox {
    background-color: #666666;
    border-color: #666666;
}

.item.checked .check-icon {
    transform: scale(1);
}

.checkbox .check-icon {
    color: #666666;
    font-size: 11px;
    transform: scale(0);
    transition: all 0.2s ease-in-out;
}

::-webkit-scrollbar {
    width: 5px;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background-color: #666666;
    border-radius: 5px;
}

::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 5px;
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        transform: translate3d(0, 30px, 0);
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(0, 20px, 0);
        opacity: 0;
    }
}

/* LEGEND */
#legend {
    position: absolute;
    bottom: 10%;
    right: 30px;
    background-color: #ffffff;
    padding: 15px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    width: 200px;
}

#legend h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #1e6091;
}

#legend-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

#legend-items li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

#legend-items li span {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    border-radius: 50%;
}

/* RESPONSIBLE DESIGN */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        padding: 20px;
    }

    #map {
        height: 450px;
    }

    .dropdown-container {
        justify-content: flex-start;
    }

    .btn {
        width: 150px;
        height: 50px;
    }

    .list-items {
        max-height: 150px;/
    }
}

/* SEPARATOR */
.separator {
    width: 100%;
    border: 1px solid #ccc;
    margin: 20px 20px;
}

/* USAGE INSTRUCTION */
.instructions-container {
    width: 100%;
    max-width: 700px;
    padding: 0 40px;
    box-sizing: border-box;
}

.instructions-title {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.instructions-text {
    margin-top: 10px;
    line-height: 1.6;
    color: #666;
    transition: all 0.3s ease-in-out;
    max-height: 500px;
    overflow: hidden;
}

.instructions-text.hidden {
    max-height: 0;
    margin-top: 0;
}

.arrow {
    margin-left: 5px;
    transition: transform 0.3s ease-in-out;
}

.arrow.rotate {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .container {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 15px;
        align-items: flex-start;
        position: relative;
    }

    .page-title {
        font-size: 20px;
        margin-bottom: 15px;
        width: 100%;
        text-align: left;
        margin-left: 20px;
    }

    #map {
        width: 100%;
        height: 60vh;
        position: relative;
        margin-left: 0;
        margin-top: 0;
        box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    }

    .dropdown-container {
        position: static;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
        left: 22%;
        top: 80px;
        transform: none;
        margin-bottom: 10px;
        z-index: inherit;
    }

    .btn {
        width: 100%;
        padding: 8px 16px;
        font-size: 14px;
        height: auto;
        margin-bottom: 0;
    }

    .list-items {
        max-height: 150px;
        width: 100%;
    }

    .language-selector {
        position: static;
        margin-left: auto;
        margin-bottom: 10px;
        align-self: flex-end;
        margin-right: 0;
        order: -1;
    }

    .separator {
        margin: 15px auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .page-title {
        font-size: 18px;
        margin-bottom: 10px;
        margin-left: 0;
    }

    #map {
        width: 100%;
        height: 50vh;
        margin-top: 0;
    }

    .dropdown-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 15px;
    }

    .btn {
        width: 100%;
        padding: 6px 12px;
        font-size: 12px;
    }

    .list-items {
        max-height: 120px;
        max-width: 100%;
    }

    .separator {
        margin: 10px auto;
    }
    
    ::-webkit-scrollbar {
        width: 4px;
    }

    ::-webkit-scrollbar-thumb {
        background-color: #666666;
    }

    ::-webkit-scrollbar-track {
        background-color: #f1f1f1;
    }
}

/* Leaflet popup styling */
.leaflet-popup-content {
    font-family: 'Source Sans Pro', sans-serif !important;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
    font-family: 'Source Sans Pro', sans-serif !important;
}

.leaflet-popup-tip {
    background: white !important;
}