:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-2: #f8fbff;
    --text: #172033;
    --muted: #6d7788;
    --border: #dde5ee;
    --primary: #0077a6;
    --primary-dark: #005b80;
    --accent: #f6b300;
    --accent-dark: #df9f00;
    --shadow: 0 12px 40px rgba(19, 35, 61, 0.08);
    --shadow-soft: 0 6px 18px rgba(19, 35, 61, 0.06);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
    background: linear-gradient(180deg, #f7f9fc 0%, #f3f6fa 100%);
    color: var(--text);
    line-height: 1.45;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(221, 229, 238, 0.85);
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.7px;
}

.brand-main {
    color: var(--primary);
}

.brand-highlight {
    color: var(--accent);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav a {
    font-size: 14px;
    font-weight: 700;
    color: #4f5b6d;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--primary);
}

.admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 800;
    color: var(--text);
    transition: all 0.2s ease;
}

.admin-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* HERO */

.hero {
    padding: 22px 0 8px;
    background:
        radial-gradient(circle at top left, rgba(0, 119, 166, 0.1), transparent 28%),
        radial-gradient(circle at right, rgba(246, 179, 0, 0.07), transparent 18%);
}

.hero-card {
    background: linear-gradient(135deg, #007aa8 0%, #006791 55%, #00597f 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-copy {
    max-width: 760px;
}

.hero-tag {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.95;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: -1px;
    max-width: 760px;
}

.hero p {
    margin: 0;
    max-width: 720px;
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.97;
}

/* SEARCH PANEL */

.search-panel {
    margin-top: 22px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
}

.search-grid {
    display: grid;
    grid-template-columns: 2fr 1.1fr 1fr 0.9fr auto;
    gap: 12px;
    align-items: end;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-field label {
    font-size: 12px;
    font-weight: 800;
    color: #5d6675;
}

.search-field input,
.search-field select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 0 14px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
}

.search-field input:focus,
.search-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 119, 166, 0.09);
}

.search-action {
    display: flex;
}

.btn-search {
    height: 48px;
    min-width: 150px;
    border: none;
    border-radius: 14px;
    background: var(--accent);
    color: #1f2937;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-search:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

/* MAIN */

.main-content {
    padding: 24px 0 44px;
}

.results-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.results-header h2 {
    margin: 0 0 4px;
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: -0.6px;
}

.results-header p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

/* RESULTS LIST */

.results-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.result-card {
    display: grid;
    grid-template-columns: 280px 1fr 220px;
    gap: 18px;
    background: var(--surface);
    border: 1px solid rgba(221, 229, 238, 0.92);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.result-media {
    min-height: 220px;
    background: linear-gradient(135deg, #edf3f9 0%, #dce8f2 100%);
}

.result-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #6f7a8a;
    font-size: 16px;
    font-weight: 800;
}

.result-main {
    padding: 18px 0 18px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.result-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.result-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    background: #e9f6fb;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.2px;
}

.partner {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
}

.result-main h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.result-location {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.result-description {
    margin: 0;
    color: #526071;
    font-size: 14px;
    line-height: 1.6;
}

.result-side {
    padding: 18px;
    border-left: 1px solid rgba(221, 229, 238, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.price-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: right;
}

.price-label {
    font-size: 11px;
    font-weight: 900;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.price-value {
    font-size: 24px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.btn-offer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-offer:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* EMPTY */

.empty-state {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 24px;
    padding: 48px 22px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.empty-state h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

/* TABLET */

@media (max-width: 1100px) {
    .hero-card {
        padding: 28px 24px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 15px;
    }

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

    .search-action {
        grid-column: span 2;
    }

    .btn-search {
        width: 100%;
    }

    .result-card {
        grid-template-columns: 240px 1fr;
    }

    .result-side {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 1px solid rgba(221, 229, 238, 0.85);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .price-box {
        text-align: left;
    }
}

/* MOBILE */

@media (max-width: 760px) {
    .container {
        width: min(100%, calc(100% - 20px));
    }

    .site-header {
        position: static;
    }

    .header-inner {
        min-height: auto;
        padding: 14px 0;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .brand {
        text-align: center;
        font-size: 32px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 14px;
        flex-wrap: wrap;
    }

    .admin-link {
        width: 100%;
    }

    .hero {
        padding: 14px 0 2px;
    }

    .hero-card {
        padding: 22px 16px 16px;
        border-radius: 22px;
    }

    .hero h1 {
        font-size: 30px;
        line-height: 1.08;
        margin-bottom: 10px;
    }

    .hero p {
        font-size: 15px;
        line-height: 1.5;
    }

    .search-panel {
        margin-top: 18px;
        padding: 14px;
        border-radius: 18px;
    }

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

    .search-action {
        grid-column: auto;
    }

    .btn-search {
        width: 100%;
        min-width: 0;
    }

    .main-content {
        padding-top: 20px;
    }

    .results-header {
        margin-bottom: 14px;
    }

    .results-header h2 {
        font-size: 26px;
    }

    .results-header p {
        font-size: 14px;
    }

    .result-card {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .result-media {
        min-height: 200px;
    }

    .result-main {
        padding: 16px;
    }

    .result-main h3 {
        font-size: 20px;
    }

    .result-description {
        font-size: 14px;
    }

    .result-side {
        padding: 16px;
        border-left: none;
        border-top: 1px solid rgba(221, 229, 238, 0.85);
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .price-box {
        text-align: left;
    }

    .price-value {
        font-size: 22px;
    }

    .btn-offer {
        width: 100%;
    }
}

.results-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 20px;
    align-items: start;
}

.map-panel {
    position: sticky;
    top: 90px;
}

#map {
    width: 100%;
    height: 720px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    background: #e8eef5;
}

@media (max-width: 1100px) {
    .results-layout {
        grid-template-columns: 1fr;
    }

    .map-panel {
        position: static;
    }

    #map {
        height: 420px;
    }
}

@media (max-width: 760px) {
    #map {
        height: 320px;
        border-radius: 18px;
    }
}

.result-title-link:hover {
    color: var(--primary);
}

.detail-page {
    padding: 24px 0 48px;
}

.detail-back {
    margin-bottom: 16px;
}

.detail-back-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.detail-hero {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.detail-media {
    min-height: 380px;
    background: linear-gradient(135deg, #edf3f9 0%, #dce8f2 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 18px;
    font-weight: 800;
}

.detail-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-title {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -0.8px;
}

.detail-location {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.detail-price-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.detail-price {
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.detail-actions {
    margin-top: 10px;
}

.btn-offer-large {
    min-height: 52px;
    padding: 0 22px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    margin-bottom: 28px;
}

.detail-content-card,
.detail-side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.detail-content-card h2,
.detail-side-card h2,
.detail-related h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.detail-description p {
    margin: 0;
    color: #526071;
    font-size: 15px;
    line-height: 1.75;
}

.detail-info-block {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.detail-info-block h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.detail-info-block p {
    margin: 0;
    color: var(--muted);
}

#detail-map {
    width: 100%;
    height: 360px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #e8eef5;
}

.detail-no-map {
    min-height: 180px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    background: var(--surface-2);
    border-radius: 18px;
    border: 1px dashed var(--border);
    padding: 16px;
}

.section-title-row {
    margin-bottom: 16px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.related-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.related-body {
    padding: 18px;
}

.related-body h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.related-location {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.related-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.related-price {
    font-weight: 900;
    font-size: 18px;
}

@media (max-width: 1100px) {
    .detail-hero,
    .detail-content-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    #detail-map {
        height: 320px;
    }
}

@media (max-width: 760px) {
    .detail-title {
        font-size: 28px;
    }

    .detail-media {
        min-height: 240px;
    }

    .detail-summary,
    .detail-content-card,
    .detail-side-card {
        padding: 18px;
        border-radius: 20px;
    }

    #detail-map {
        height: 260px;
    }
}

.result-card-active {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(12, 33, 66, 0.16);
    border-color: rgba(18, 84, 255, 0.35);
}

.custom-marker {
    background: transparent;
    border: none;
}

.custom-marker span {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
    transition: all 0.18s ease;
}

.custom-marker-active span {
    width: 24px;
    height: 24px;
    background: #ff6b35;
    border: 4px solid #fff;
    box-shadow: 0 10px 24px rgba(255, 107, 53, 0.35);
}

.brand-logo{
    height:42px;
    width:auto;
    border-radius:10px;
}