:root {
    --primary: #003fbb;
    --primary-dark: #002f8d;
    --primary-soft: #edf4ff;
    --border: #dbe6f7;
    --text: #061b3f;
    --muted: #5c6f91;
    --white: #ffffff;
    --bg: #f7fbff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-bottom: 118px;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

button,
input,
select {
    font-family: inherit;
}

.site-header {
    height: 66px;
    padding: 0 54px;
    background: var(--white);
    display: grid;
    grid-template-columns: 280px 1fr auto;
    align-items: center;
    border-bottom: 1px solid #eef3fb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    font-size: 25px;
    font-weight: 900;
}

.header-logo-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.main-nav a {
    color: #08245a;
    font-size: 15px;
    font-weight: 700;
}

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

.header-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}

.location-btn,
.login-btn,
.register-btn {
    height: 42px;
    padding: 0 22px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--primary);
    font-weight: 800;
    cursor: pointer;
}

.register-btn {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-layout {
    max-width: 1900px;
    margin: 0 auto;
    padding: 14px 22px 0;
    display: grid;
    grid-template-columns: 210px minmax(900px, 1fr) 210px;
    gap: 26px;
}

.left-sidebar,
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ad-card {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0, 63, 187, 0.06);
}

.ad-image-card img {
    width: 100%;
    display: block;
}

.text-ad-card {
    padding: 24px 18px;
    background: linear-gradient(160deg, #f4f8ff, #ffffff);
}

.text-ad-card span {
    display: block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 18px;
}

.text-ad-card h3 {
    margin: 0;
    color: var(--primary);
    font-size: 22px;
    line-height: 1.25;
}

.text-ad-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.text-ad-card button {
    height: 42px;
    padding: 0 16px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-weight: 800;
    cursor: pointer;
}

.main-content {
    min-width: 0;
}

.hero {
    position: relative;
    min-height: 292px;
    padding: 32px 32px 22px;
    border-radius: 18px;
    border: 1px solid var(--border);
    overflow: hidden;

    background-size: cover;
    background: url("../images/hero-dental.png") no-repeat center;
}

.hero-text {
    max-width: 560px;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    margin: 0;
    font-size: 40px;
    line-height: 1.05;
    letter-spacing: -0.7px;
    color: #081124;
}

.hero-text h1 span {
    display: block;
    color: var(--primary);
}

.hero-text p {
    margin: 12px 0 0;
    color: var(--primary);
    font-size: 17px;
    line-height: 1.4;
    font-weight: 600;
}

/*.hero-image {*/
/*    position: absolute;*/
/*    right: 0;*/
/*    top: 0;*/
/*    width: 58%;*/
/*    height: 100%;*/
/*}*/

/*.hero-image img {*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    object-fit: cover;*/
/*}*/

.search-panel {
    position: relative;
    z-index: 2;
    margin-top: 28px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 63, 187, 0.10);
    overflow: hidden;
}

.search-row {
    display: grid;
    grid-template-columns: 2fr 1.1fr 1.1fr 1.1fr 1.1fr 170px;
    min-height: 62px;
}

.search-field {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 12px 18px;
    border-right: 1px solid var(--border);
}

.field-icon {
    font-size: 22px;
}

.search-field label {
    display: block;
    font-size: 12px;
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 4px;
}

.search-field input,
.search-field select {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #142b5c;
    font-size: 14px;
    font-weight: 700;
}

.search-field input::placeholder {
    color: #7b8eb1;
}

.search-btn {
    border: none;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.filter-row {
    min-height: 52px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.filter-row span {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.filter-row button {
    height: 30px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f7fbff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.clear-filter {
    margin-left: auto;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.results-section {
    margin-top: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 10px;
}

.section-header h2 {
    margin: 0;
    color: var(--primary);
    font-size: 20px;
}

.view-all {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 16px;
}

.clinic-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.clinic-card {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: white;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 63, 187, 0.07);
}

.clinic-photo {
    height: 138px;
    position: relative;
    overflow: hidden;
}

.clinic-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rating-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #13b86b;
    color: white;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.clinic-body {
    padding: 12px 14px 14px;
}

.clinic-body h3 {
    margin: 0 0 7px;
    color: var(--primary);
    font-size: 15px;
}

.clinic-address,
.clinic-time {
    margin: 5px 0;
    color: #314b78;
    font-size: 12px;
    font-weight: 700;
}

.clinic-tags {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 9px;
}

.clinic-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
}

.clinic-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-btn {
    flex: 1;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

.favorite-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: white;
    color: var(--primary);
    font-size: 24px;
    cursor: pointer;
}

.map-card {
    min-height: 300px;
}

.fake-map {
    height: 100%;
    min-height: 300px;
    position: relative;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: linear-gradient(30deg, transparent 48%, rgba(255, 204, 102, 0.7) 49%, rgba(255, 204, 102, 0.7) 51%, transparent 52%),
    linear-gradient(120deg, transparent 48%, rgba(255, 204, 102, 0.6) 49%, rgba(255, 204, 102, 0.6) 51%, transparent 52%),
    linear-gradient(0deg, #f5faf6, #ffffff);
}

.map-pin {
    position: absolute;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50% 50% 50% 8px;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.pin-1 {
    top: 45px;
    left: 120px;
}

.pin-2 {
    top: 85px;
    right: 150px;
}

.pin-3 {
    bottom: 80px;
    left: 150px;
}

.pin-4 {
    bottom: 70px;
    right: 210px;
}

.pin-5 {
    top: 170px;
    left: 45%;
}

.user-location {
    position: absolute;
    top: 135px;
    left: 52%;
    width: 20px;
    height: 20px;
    background: #1268ff;
    border: 5px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 10px rgba(18, 104, 255, 0.18);
}

.zoom-controls {
    position: absolute;
    right: 16px;
    top: 95px;
    display: grid;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(0, 63, 187, 0.12);
}

.zoom-controls button {
    width: 38px;
    height: 38px;
    border: none;
    background: white;
    color: var(--primary);
    font-size: 20px;
    font-weight: 900;
}

.map-info {
    position: absolute;
    left: 22px;
    bottom: 22px;
    right: 180px;
    background: white;
    border-radius: 14px;
    padding: 13px 18px;
    box-shadow: 0 12px 30px rgba(0, 63, 187, 0.12);
}

.map-info strong {
    color: var(--primary);
    font-size: 14px;
}

.map-info p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.trust-section {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-radius: 16px;
    border: 1px solid var(--border);
    background: white;
    overflow: hidden;
}

.trust-card {
    min-height: 82px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-right: 1px solid var(--border);
}

.trust-card:last-child {
    border-right: none;
}

.trust-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: linear-gradient(135deg, #0051d8, #6da0ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 8px 18px rgba(0, 63, 187, 0.20);
}

.trust-card h4 {
    margin: 0 0 4px;
    color: var(--primary);
    font-size: 15px;
}

.trust-card p {
    margin: 0;
    color: #314b78;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
}

.stats-section {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border-radius: 16px;
    border: 1px solid var(--border);
    background: white;
    overflow: hidden;
}

.stat-item {
    min-height: 70px;
    padding: 13px 18px;
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    column-gap: 10px;
    border-right: 1px solid var(--border);
}

.stat-item:last-child {
    border-right: none;
}

.stat-item span {
    grid-row: span 2;
    color: var(--primary);
    font-size: 24px;
}

.stat-item strong {
    color: var(--primary);
    font-size: 22px;
    line-height: 1;
}

.stat-item p {
    margin: 0;
    color: #314b78;
    font-size: 12px;
    font-weight: 700;
}

.empty {
    grid-column: 1 / -1;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 40px;
    text-align: center;
    color: var(--muted);
}

.fixed-app-footer {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: min(1360px, calc(100% - 48px));
    z-index: 200;
}

.fixed-footer-inner {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 63, 187, 0.25);
}

.footer-banner-img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    display: block;
}

.footer-close {
    position: absolute;
    right: 18px;
    top: 12px;
    z-index: 3;
    border: none;
    background: transparent;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

@media (max-width: 1500px) {
    .page-layout {
        grid-template-columns: 180px minmax(800px, 1fr) 180px;
        gap: 18px;
    }

    .search-row {
        grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr 150px;
    }

    .main-nav {
        gap: 30px;
    }
}

@media (max-width: 1200px) {
    .site-header {
        padding: 0 20px;
        grid-template-columns: 240px 1fr;
    }

    .main-nav {
        display: none;
    }

    .page-layout {
        grid-template-columns: 1fr;
    }

    .left-sidebar,
    .right-sidebar {
        display: none;
    }

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

    .search-field {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

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

    .clinic-results {
        grid-template-columns: repeat(3, 1fr);
    }

    .trust-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 92px;
    }

    .site-header {
        height: auto;
        padding: 12px 16px;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .header-actions {
        overflow-x: auto;
    }

    .page-layout {
        padding: 12px;
    }

    .hero {
        padding: 24px 18px;
    }

    .hero-text h1 {
        font-size: 31px;
    }

    .hero-image {
        opacity: 0.25;
        width: 100%;
    }

    .clinic-results {
        grid-template-columns: 1fr;
    }

    .trust-section {
        grid-template-columns: 1fr;
    }

    .trust-card {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .stats-section {
        grid-template-columns: 1fr 1fr;
    }

    .fixed-app-footer {
        width: calc(100% - 24px);
        bottom: 10px;
    }

    .footer-banner-img {
        height: 72px;
    }

    .footer-close {
        top: 4px;
        right: 10px;
    }
}