/********** Base **********/
:root {
    --primary: #6f3ff5;
    --primary-dark: #5220d9;
    --secondary: #f7b500;
    --light: #f7f8fc;
    --dark: #16171d;
    --text-muted: #6f7684;
    --border-soft: rgba(255, 255, 255, 0.18);
    --shadow-lg: 0 20px 45px rgba(19, 22, 36, 0.12);
    --shadow-md: 0 12px 28px rgba(19, 22, 36, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: #f4f6fb;
    color: var(--dark);
}

a {
    text-decoration: none;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Typography ***/
h1,
h2,
.fw-bold {
    font-weight: 800 !important;
}

h3,
h4,
.fw-semi-bold {
    font-weight: 700 !important;
}

h5,
h6,
.fw-medium {
    font-weight: 500 !important;
}

/*** Button ***/
.btn {
    font-weight: 500;
    transition: .35s;
}

.btn:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, .15);
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

/*** Navbar ***/
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f067";
    font-family: "Font Awesome 5 Free";
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar-light .navbar-nav .nav-link {
    position: relative;
    margin-right: 22px;
    padding: 26px 0;
    font-family: 'Jost', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92) !important;
    outline: none;
    transition: .3s;
}

.sticky-top.navbar-light .navbar-nav .nav-link {
    padding: 18px 0;
    color: var(--dark) !important;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: #ffd24c !important;
}

.navbar-light .navbar-brand h1 {
    color: #FFFFFF;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.sticky-top.navbar-light .navbar-brand h1 {
    color: var(--primary);
}

.navbar-light .navbar-nav .nav-item .dropdown-menu {
    border: 0;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 10px;
}

.dropdown-item {
    border-radius: 10px;
    padding: 10px 14px;
}

.dropdown-item:hover {
    background: #f2edff;
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .sticky-top.navbar-light {
        position: relative;
        background: #fff;
    }

    .navbar-light .navbar-collapse {
        margin-top: 15px;
        border-top: 1px solid #eee;
        background: #fff;
        border-radius: 16px;
        padding: 8px 18px;
    }

    .navbar-light .navbar-nav .nav-link,
    .sticky-top.navbar-light .navbar-nav .nav-link {
        padding: 12px 0;
        margin-left: 0;
        color: var(--dark) !important;
    }

    .navbar-light .navbar-brand h1 {
        color: var(--primary);
    }
}

@media (min-width: 992px) {
    .navbar-light {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        z-index: 999;
    }

    .sticky-top.navbar-light {
        position: fixed;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(0, 0, 0, .06);
    }

    .navbar-light .navbar-nav .nav-item .dropdown-menu {
        display: block;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .3s;
    }

    .navbar-light .navbar-nav .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        opacity: 1;
    }
}

/*** Modern Hero ***/
.hero-modern {
    position: relative;
    overflow: hidden;
    padding: 120px 0 110px;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 22%),
        radial-gradient(circle at 80% 10%, rgba(255,255,255,0.14), transparent 18%),
        linear-gradient(135deg, #5d2fe3 0%, #6f3ff5 45%, #4b24c6 100%);
}

.hero-modern::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
        url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg opacity='0.14'%3E%3Ccircle cx='15' cy='18' r='1.5' fill='white'/%3E%3Ccircle cx='85' cy='50' r='1.5' fill='white'/%3E%3Ccircle cx='130' cy='25' r='1.5' fill='white'/%3E%3Cpath d='M15 18L85 50L130 25' stroke='white' stroke-width='0.8'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding-top: 34px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border: 1px solid var(--border-soft);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.hero-title {
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 4.1rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
}

.hero-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 1.02rem;
    line-height: 1.8;
    margin: 0 auto 28px;
    max-width: 700px;
}

.search-panel {
    display: flex;
    align-items: center;
    max-width: 640px;
    margin-top: 12px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    height: 64px;
    padding: 0 22px;
    font-size: 16px;
    color: var(--dark);
}

.search-input::placeholder {
    color: #9297a5;
}

.search-btn {
    width: 72px;
    height: 64px;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-size: 24px;
    transition: .25s ease;
}

.search-btn:hover {
    filter: brightness(1.06);
}

.map-section {
    position: relative;
    margin-top: -48px;
    padding-bottom: 60px;
    z-index: 2;
}

.map-card {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, 0.05);
}

.map-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid #eef0f6;
}

.map-card-header h2 {
    font-size: 1.25rem;
    margin-bottom: 6px;
    color: #1c2030;
}

.map-card-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.reset-btn {
    border: none;
    background: #f2edff;
    color: var(--primary);
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 12px;
    transition: .25s;
    white-space: nowrap;
}

.reset-btn:hover {
    background: #e6dcff;
}

#map {
    width: 100%;
    height: min(72vh, 760px);
    min-height: 520px;
}

.leaflet-control-zoom a {
    border-radius: 10px !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    box-shadow: var(--shadow-md);
}

@media (max-width: 991.98px) {
    .hero-modern {
        padding: 92px 0 80px;
    }

    .hero-content {
        padding-top: 18px;
    }

    .search-panel {
        max-width: 100%;
        border-radius: 18px;
    }

    .search-input {
        height: 58px;
        font-size: 15px;
    }

    .search-btn {
        width: 64px;
        height: 58px;
    }

    .map-section {
        margin-top: -26px;
    }

    .map-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    #map {
        height: 62vh;
        min-height: 420px;
    }
}

@media (max-width: 575.98px) {
    .hero-modern {
        padding: 84px 0 72px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .search-input {
        padding: 0 16px;
    }

    .map-card-header {
        padding: 20px 18px 16px;
    }
}
