html,
body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

body {
    background:
        linear-gradient(180deg, #0b3a6f 0, #0b3a6f 220px, #eef3f7 220px, #f7fafc 100%);
    color: #18324a;
    font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
}

.page-shell {
    min-height: 100%;
}

.page-shell-search {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: visible;
}

.hero-bar {
    position: relative;
    z-index: 100;
    overflow: visible;
    padding: 24px 18px 26px;
}

.hero-inner {
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(340px, 0.95fr) minmax(520px, 1.35fr);
    gap: 28px;
    align-items: end;
    padding: 24px 28px;
    border-radius: 22px;
    background: linear-gradient(135deg, #0b3a6f 0, #0d447f 72%, #b01b24 100%);
    box-shadow: 0 16px 34px rgba(7, 30, 57, 0.16);
    overflow: visible;
}

.hero-copy {
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0 0 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    color: #ffffff;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.hero-subtitle {
    max-width: 640px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.6;
}

.hero-actions {
    margin-top: 16px;
}

.btn-portal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: transparent;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-portal:hover,
.btn-portal:focus {
    background: #ffffff;
    border-color: #ffffff;
    color: #0b3a6f;
    text-decoration: none;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 14px;
    align-items: stretch;
    padding: 0;
}

.search-field {
    position: relative;
    z-index: 40;
}

.search-form .form-control {
    min-height: 56px;
    border: 0;
    border-radius: 16px;
    box-shadow: none;
    color: #19304f;
    background: #ffffff;
    font-size: 18px;
    font-weight: 600;
    padding: 10px 20px;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid rgba(11, 58, 111, 0.18);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(7, 30, 57, 0.18);
}

.search-suggestions.hidden {
    display: none;
}

.search-suggestions-title {
    padding: 14px 18px 8px;
    color: #4f6480;
    font-size: 13px;
    font-weight: 700;
}

.search-suggestion {
    width: 100%;
    display: block;
    padding: 14px 18px;
    border: 0;
    border-top: 1px solid rgba(11, 58, 111, 0.08);
    background: #ffffff;
    color: #11386f;
    font-size: 15px;
    text-align: left;
}

.search-suggestion:first-of-type {
    border-top: 0;
}

.search-suggestion:hover,
.search-suggestion:focus,
.search-suggestion.is-active {
    outline: none;
    background: #f4f8fd;
}

.search-form .form-control:focus {
    border-color: rgba(11, 58, 111, 0.36);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.btn-search {
    min-height: 56px;
    border: 0;
    border-radius: 16px;
    background: #b01b24;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: none;
}

.btn-search:hover,
.btn-search:focus {
    color: #fff;
    background: #99131d;
}

.search-layout {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr;
    min-height: 0;
    overflow: hidden;
    background: #ffffff;
}

.results-panel {
    height: 100%;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid rgba(16, 55, 116, 0.1);
    padding: 28px 20px 24px;
}

.results-summary h2 {
    margin: 0;
    color: #1d2f45;
    font-size: 20px;
    font-weight: 700;
}

.results-summary h2 span {
    font-weight: 400;
}

.results-summary p {
    margin: 10px 0 0;
    color: #5b6e85;
    font-size: 14px;
    line-height: 1.5;
}

.results-list {
    margin-top: 22px;
}

.results-empty {
    padding: 24px 20px;
    border: 1px dashed rgba(17, 61, 131, 0.22);
    border-radius: 20px;
    background: #f8fbff;
    color: #486784;
}

.results-empty h3 {
    margin: 0 0 8px;
    color: #173a6f;
    font-size: 20px;
}

.results-empty p {
    margin: 0;
    line-height: 1.6;
}

.results-featured {
    margin-bottom: 26px;
    padding-top: 2px;
}

.results-group h3 {
    margin: 0 0 16px;
    color: #1d2f45;
    font-size: 18px;
    font-weight: 700;
}

.results-stack {
    display: flex;
    flex-direction: column;
}

.result-card {
    width: 100%;
    display: block;
    text-align: left;
    border: 0;
    border-top: 1px solid rgba(15, 40, 80, 0.18);
    background: transparent;
    padding: 18px 8px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.result-card:first-child {
    border-top: 0;
}

.result-card:hover,
.result-card:focus {
    outline: none;
    background: rgba(17, 61, 131, 0.03);
}

.result-card-featured {
    border: 2px solid #143f84;
    border-radius: 14px;
    padding: 18px 18px 14px;
    box-shadow: 0 16px 34px rgba(17, 61, 131, 0.08);
}

.result-card.is-active {
    background: rgba(17, 61, 131, 0.04);
}

.result-card-featured.is-active {
    box-shadow: 0 18px 40px rgba(17, 61, 131, 0.14);
}

.result-card-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}

.result-card-row:last-child {
    margin-bottom: 0;
}

.result-card-label {
    color: #253f5d;
    font-size: 14px;
}

.result-card-value {
    color: #0f2850;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
}

.map-panel {
    position: relative;
    z-index: 1;
    min-height: 400px;
}

#map-canvas {
    width: 100%;
    height: 100%;
    min-height: 400px;
    position: relative;
    z-index: 1;
}

.leaflet-container {
    background: #dce7f2;
    color: #18324a;
    font: inherit;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    box-shadow: 0 18px 36px rgba(24, 50, 74, 0.18);
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 10px 0 0 0;
    color: #476784;
}

.map-popup {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}

.map-popup strong {
    color: #0f2850;
    font-size: 15px;
}

.map-popup span {
    color: #516882;
    font-size: 13px;
}

#btn-up {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;
}

#loading-div {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.68);
    color: #ffffff;
    z-index: 30;
}

#loading-div.hidden {
    display: none;
}

#loading-div h1 {
    width: 100%;
    position: absolute;
    top: calc(50% + 42px);
    left: 0;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 4px;
    font: 300 32px/1 'Open Sans Condensed', sans-serif;
}

#loading-div .loading {
    width: 100px;
    height: 100px;
    position: absolute;
    top: calc(50% - 50px);
    left: calc(50% - 50px);
    box-sizing: border-box;
    border-top: 8px solid rgb(255, 255, 255);
    border-right: 8px solid rgba(255, 255, 255, 0.3);
    border-bottom: 8px solid rgba(255, 255, 255, 0.3);
    border-left: 8px solid rgba(255, 255, 255, 0.3);
    border-radius: 100%;
    animation: rotate 1s infinite linear;
}

.sr-only,
.sr-only-focusable {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.sr-only-focusable:focus {
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    padding: 10px 14px;
    background: #ffffff;
    color: #18324a;
    border-radius: 10px;
    z-index: 40;
}

@keyframes rotate {
    from {
        transform: rotate(0deg) translate3d(0, 0, 0);
    }

    to {
        transform: rotate(359deg) translate3d(0, 0, 0);
    }
}

@media (max-width: 991px) {
    html,
    body {
        overflow: auto;
    }

    .page-shell-search {
        height: auto;
        overflow: visible;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-copy h1 {
        font-size: 32px;
    }

    .search-layout {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .results-panel {
        height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(16, 55, 116, 0.1);
        max-height: 420px;
    }

    .map-panel,
    #map-canvas {
        min-height: 460px;
    }
}

@media (max-width: 767px) {
    body {
        background: linear-gradient(180deg, #0b3a6f 0, #0b3a6f 260px, #eef3f7 260px, #f7fafc 100%);
    }

    .hero-bar {
        padding: 16px 12px 18px;
    }

    .hero-inner {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .hero-copy h1 {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 14px;
        line-height: 1.6;
    }

    .hero-actions {
        margin-top: 18px;
    }

    .btn-portal {
        width: 100%;
    }

    .search-form {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .search-form .form-control,
    .btn-search {
        min-height: 52px;
        font-size: 17px;
    }

    .results-panel {
        padding: 22px 14px;
    }

    .result-card-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
