html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 100vh;
    background: #181a1b;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#map {
    height: 70vh;
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    border: 2px solid #333;
    border-radius: 25px;
    box-shadow: 0 0 35px rgba(255, 0, 0, 0.3);
    z-index: 1;
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: #222;
    padding: 2rem;
    border-radius: 12px;
    width: 1000px;
    max-width: 1000px;
    width: 70%;
    color: #fff;
    text-align: center;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    position: relative;
    max-height: 700px;
    overflow-y: auto;
}

.modal-backdrop.active .modal {
    transform: scale(1);
    opacity: 1;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
}

.modal img {
    width: 70%;
    border-radius: 8px;
    margin-top: 1rem;
    /* max-height: 600px; */
}

.modal video {
    width: 70%;
    border-radius: 8px;
    height: min-content;
    /* max-height: 500px; */
}

/* legend */

.legend {

    justify-content: center;
    background-color: rgba(24, 26, 27, 0.95);
    color: #e0e0e0;
    padding: 15px;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    z-index: 1000;
    width: fit-content;
}

.legend h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: red;
    text-shadow: 0 0 10px darkred;
}

.legend label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-bottom: 4px;
}

.color-box {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
    margin-right: 5px;
}

/* .legend button {
    width: 50%;
    padding: 5px;
    margin-bottom: 8px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background-color: #f0f0f0;
    cursor: pointer;
} */

.legend button:hover {
    background-color: #e0e0e017;
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 5px;
    margin: -10px -10px 5px -10px;
    border-radius: 5px 5px 0 0;
}

.legend-header h4 {
    margin: 0;
    width: 90%;
}

.toggle-legend {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    margin-left: 10px;
}

.toggle-legend img {
    width: 25px;
    height: 25px;
    vertical-align: middle;
}

#toggle-all {
    margin-bottom: 5px;
    padding: 8px 12px;
    border: 1px solid #cccccc7e;
    border-radius: 4px;
    background-color: #52525257;
    cursor: pointer;
    font-size: 14px;
    color: #ffffff;
    transition: background-color 0.2s;
}

#toggle-all:hover {
    background-color: #000000;
}


.legend-content {
    transition: all 0.3s ease;
}

/* Style for when content is hidden */
.legend-content.collapsed {
    display: none;
}

/* Scrollbar styling */
.legend::-webkit-scrollbar {
    width: 8px;
}

.legend::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.legend::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.legend::-webkit-scrollbar-thumb:hover {
    background: #555;
}



/* background particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    background-color: #ff4500;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation: moveUp linear infinite;
}

@keyframes moveUp {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-700px);
        opacity: 0;
    }
}


/* ===== HEADER STYLES ===== */
header {

    display: flex;
    flex-direction: row;

    width: 100%;
    background-color: #070303;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    width: 5%;
}


h3 {
    text-align: center;
    color: #ff4c4c;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(255, 76, 76, 0.3);
    padding-bottom: 10px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}


#banner {
    width: 75%;
}

#banner img {
    width: 100%;
    border-radius: 10px;
}

#banner_mobile {
    display: none;
}

#map_section {
    width: 70%;
}

/* Contact Us */
.contactUsButton {
    display: flex;
    /* flex-direction: column; */
    width: fit-content;
    justify-content: center;
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    background-color: #b00418;
    /* Indigo-600 */
    padding: 0.75rem;
    border: solid rgb(136, 9, 9) 1px;
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(255, 0, 0, 0.35);
    font-family: Arial, sans-serif;
    font-size: 0.975rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.3s ease-in-out;
    z-index: 50;
}

.contactUsButton a {
    font-weight: bold;
    color: white;
    text-decoration: none;
    align-self: center;
}

.contactUsButton:hover {
    background-color: #a00316;
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.5);
}

/* Search */

.search {
    display: table;

    margin: 10px;

    input {
        background: none;
        border: none;
        outline: none;
        width: 28px;
        min-width: 0;
        padding: 0;
        z-index: 1;
        position: relative;
        line-height: 18px;
        margin: 5px 0;
        font-size: 14px;
        -webkit-appearance: none;
        font-family: 'Mukta Malar';
        transition: all .6s ease;
        cursor: pointer;
        color: #fff;

        &+div {
            position: relative;
            height: 28px;
            width: 100%;
            margin: -28px 0 0 0;

            svg {
                display: block;
                position: absolute;
                height: 28px;
                width: 160px;
                right: 0;
                top: 0;
                fill: none;
                stroke: #fff;
                stroke-width: 1.5px;
                stroke-dashoffset: 212.908 + 59;
                stroke-dasharray: 59 212.908;
                transition: all .6s ease;
            }
        }

        &:not(:placeholder-shown),
        &:focus {
            width: 160px;
            padding: 0 4px;
            cursor: text;

            &+div {
                svg {
                    stroke-dasharray: 150 212.908;
                    stroke-dashoffset: 300;
                }
            }
        }
    }
}

::selection {
    background: rgba(#fff, .2);
}

::-moz-selection {
    background: rgba(#fff, .2);
}

#search-results {
    position: absolute;
    top: 100%;
    /* positions it directly below the input */
    left: 0;
    right: 0;
    z-index: 999;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 5px 0;
    margin: 0;
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
}

#search-results li {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #eee;
}

#search-results li:hover {
    background-color: #2a2a2a;
}


/* responsive */
@media (max-width: 600px) {
    #map {
        width: 95%;
        height: 65vh;
    }

    .legend {
        font-size: 10px;
    }

    .legend h4 {
        font-size: 13px;
    }

    .legend button {
        font-size: 11px;
    }

    header {
        padding: 0.8rem;
    }

    .logo {
        width: 15%;
    }

    .button-container {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .card-image {
        margin: 0 0 15px 0;
        width: 250px;
        height: 250px;
        background-position: center center;
        background-repeat: no-repeat;
        background-size: cover;
    }

    .card-content h2 {
        font-size: 18px;
    }


    .modal {
        width: 90%;
        max-height: 600px;
        overflow-y: auto;
    }

    .modal p {
        font-size: 0.9rem;
    }

    .modal h1 {
        font-size: 1.5rem;
    }

    figure {
        width: 90%;
    }

    .modal img,
    .modal video {
        width: 95%;
    }

    .modalcontent {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #content {
        flex-direction: column-reverse;
    }

    #voting_section {
        margin: 10px;
        align-self: center;

    }

    #map_section {
        width: 100%;
    }

    .contactUsButton {
        width: fit-content;
        font-size: 0.675rem;
        bottom: 2rem;
        right: 1rem;

    }

    #banner {
        display: none;
    }

    #banner_mobile {
        display: block;
        width: 90%;
    }

    #banner_mobile img {
        width: 100%;
        border-radius: 10px;
    }

    .search {
        display: table;

        margin: 10px;

        input {
            background: none;
            border: none;
            outline: none;
            width: 28px;
            min-width: 0;
            padding: 0;
            z-index: 1;
            position: relative;
            line-height: 18px;
            margin: 5px 0;
            font-size: 14px;
            -webkit-appearance: none;
            font-family: 'Mukta Malar';
            transition: all .6s ease;
            cursor: pointer;
            color: #fff;

            &+div {
                position: relative;
                height: 28px;
                width: 100%;
                margin: -28px 0 0 0;

                svg {
                    display: block;
                    position: absolute;
                    height: 28px;
                    width: 110px;
                    right: 0;
                    top: 0;
                    fill: none;
                    stroke: #fff;
                    stroke-width: 1.5px;
                    stroke-dashoffset: 212.908 + 59;
                    stroke-dasharray: 59 212.908;
                    transition: all .6s ease;
                }
            }

            &:not(:placeholder-shown),
            &:focus {
                width: 100px;
                padding: 0 4px;
                cursor: text;

                &+div {
                    svg {
                        stroke-dasharray: 150 212.908;
                        stroke-dashoffset: 300;
                    }
                }
            }
        }
    }


}


/* Label above circle */
.circle-label {
    width: 200px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    color: black;
    /* background: rgba(255, 255, 255, 0.7); */
    padding: 2px 5px;
    border-radius: 5px;
    white-space: nowrap;
    text-shadow: 1px 1px 2px white;
    pointer-events: none;
}

.marker-cluster-small {
    background-color: rgba(181, 226, 140, 0.3);

    color: #07030383;
}