
/* =========================================
   UM CAMPUS MAPS — FINAL MODERN UI
   ========================================= */

:root {
    --blue: #1557A6;
    --blue-dark: #104782;
    --text: #263548;

    --building: #262626;
    --facility: #2563EB;
    --canteen: #EAB308;
    --parking: #9333EA;
    --my-location: #DC2626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    min-height: 100vh;
    background: linear-gradient(
        135deg,
        #E5F1FF 0%,
        #E9F8F2 50%,
        #E5ECFF 100%
    );
}

/* =========================================
   HEADER + LOGO UM
   ========================================= */

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 125px;
    padding: 20px 28px;
    background: linear-gradient(
        115deg,
        #D9EDFF 0%,
        #E6F8F1 55%,
        #DFE9FF 100%
    );
    border-bottom: 1px solid rgba(21, 87, 166, 0.12);
}

.header-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    max-width: 1000px;
}

.logo-um {
    display: block;
    width: 76px;
    height: 76px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-text {
    text-align: left;
}

.header h1 {
    margin-bottom: 7px;
    color: #154B91;
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 750;
    letter-spacing: -0.7px;
}

.header p {
    color: #526B84;
    font-size: clamp(14px, 1.8vw, 18px);
    line-height: 1.5;
}

/* =========================================
   SEARCH BAR
   ========================================= */

.search-section {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 16px 20px 10px;
    padding: 0;
    background: transparent;
}

#searchInput {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 18px;
    border: 1px solid #D6E3F0;
    border-radius: 25px;
    outline: none;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    font-size: 14px;
    box-shadow: 0 3px 12px rgba(34, 76, 120, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#searchInput::placeholder {
    color: #8392A5;
}

#searchInput:focus {
    border-color: #4387D5;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#searchButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 46px;
    padding: 0 22px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #1767B4, #104782);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(21, 87, 166, 0.20);
    transition: transform 0.2s, box-shadow 0.2s;
}

#searchButton:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(21, 87, 166, 0.25);
}

#searchButton:active {
    transform: scale(0.97);
}

/* =========================================
   CATEGORY BUTTONS
   Urutan mengikuti HTML:
   Semua, Gedung, Kantin, Fasilitas,
   Parkir, Lokasi Saya
   ========================================= */

.categories {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px 16px;
    background: transparent;
    overflow-x: auto;
}

.categories button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 17px;
    border: 1px solid #DCE5EF;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.90);
    color: #334155;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(35, 65, 100, 0.07);
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        filter 0.2s;
}

.categories button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(35, 65, 100, 0.13);
}

.categories button:active {
    transform: scale(0.97);
}

/* Semua — biru */

.categories button:nth-child(1) {
    background: linear-gradient(135deg, #4D83B8, #285C91);
    color: #FFFFFF;
    border-color: transparent;
}

/* Gedung — hitam/abu-abu */

.categories button:nth-child(2) {
    background: #F0F1F3;
    color: #262626;
    border-color: #D5D7DB;
}

/* Kantin — kuning */

.categories button:nth-child(3) {
    background: #FFF8DF;
    color: #946B00;
    border-color: #F3D777;
}

/* Fasilitas — biru */

.categories button:nth-child(4) {
    background: #EAF1FF;
    color: #1D4ED8;
    border-color: #C9D9FF;
}

/* Parkir — ungu */

.categories button:nth-child(5) {
    background: #F5EBFF;
    color: #7E22CE;
    border-color: #E2CCFF;
}

/* Lokasi Saya — merah */

.categories button:nth-child(6) {
    background: #FFF0F0;
    color: #C62828;
    border-color: #FFCFCF;
}

/* =========================================
   MAP
   ========================================= */

main {
    padding: 0 12px 14px;
}

#map {
    position: relative;
    width: 100%;
    height: calc(100vh - 225px);
    min-height: 420px;
    border: 1px solid #D5E3EE;
    border-radius: 15px;
    overflow: hidden;
    background: #E5EDF2;
    box-shadow: 0 5px 18px rgba(36, 70, 105, 0.12);
}

/* Leaflet popup */

.leaflet-popup-content-wrapper {
    border-radius: 12px;
}

.leaflet-popup-content {
    line-height: 1.55;
}

.leaflet-popup-content h3 {
    margin-bottom: 8px;
    color: #154B91;
}

/* Custom marker jika menggunakan class ini */

.umaps-marker {
    background: transparent;
    border: none;
}

/* =========================================
   RESPONSIVE — HP DAN TABLET
   ========================================= */

@media (max-width: 600px) {
    .header {
        min-height: 100px;
        padding: 16px 12px;
    }

    .header-brand {
        gap: 12px;
    }

    .logo-um {
        width: 54px;
        height: 54px;
    }

    .header h1 {
        font-size: 22px;
        letter-spacing: -0.4px;
        margin-bottom: 5px;
    }

    .header p {
        font-size: 12px;
    }

    .search-section {
        gap: 7px;
        margin: 12px 10px 10px;
    }

    #searchInput {
        height: 42px;
        padding: 0 13px;
        font-size: 13px;
    }

    #searchButton {
        height: 42px;
        padding: 0 16px;
        font-size: 13px;
    }

    .categories {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 10px 12px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .categories button {
        min-height: 39px;
        padding: 8px 13px;
        font-size: 13px;
    }

    main {
        padding: 0 8px 8px;
    }

    #map {
        height: calc(100vh - 205px);
        min-height: 380px;
        border-radius: 12px;
    }
}
