:root {
    --medimed: #19A39C;
    --medimed-dark: #127772;
    --medimed-darker: #0D5C57;
    --medimed-light: #DCF4F4;
    --medimed-lighter: #F4F9FA;
    --medimed-topbar: #AAD9C8;
    --orange: #f59e0b;
    --ink: #333333;
    --muted: #666666;
    --line: #E7E7E7;
    --surface: #ffffff;
    --background: #F4F9FA;
    --shadow: 0 20px 55px rgba(13, 92, 87, 0.12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--background);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--background); color: var(--ink); }
button, input { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.site-header {
    min-height: 76px;
    padding: 14px clamp(20px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 20;
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
    width: 176px;
    height: 48px;
    display: block;
    background: transparent;
    border-radius: 0;
}
.brand-mark img {
    width: 176px;
    height: 48px;
    display: block;
}
.brand strong { display: block; color: var(--medimed-dark); font-size: 20px; line-height: 1.05; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; text-transform: uppercase; letter-spacing: .08em; }
.header-note { color: var(--muted); font-size: 13px; }
.back-link { color: var(--medimed); font-weight: 750; text-decoration: none; }

.hero {
    padding: clamp(54px, 8vw, 108px) clamp(20px, 6vw, 92px) clamp(64px, 9vw, 116px);
    background:
        radial-gradient(circle at 88% 20%, rgba(245, 158, 11, .17), transparent 25%),
        radial-gradient(circle at 8% 86%, rgba(35, 191, 172, .22), transparent 30%),
        linear-gradient(135deg, var(--medimed-darker), var(--medimed));
    color: white;
    position: relative;
    overflow: visible;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .12;
    background-image: linear-gradient(30deg, transparent 45%, white 46%, transparent 47%);
    background-size: 36px 36px;
}

.hero-copy, .search-panel { position: relative; z-index: 2; }
.hero-copy { max-width: 820px; margin: 0 auto 34px; text-align: center; }
.eyebrow { display: inline-block; color: var(--orange); font-weight: 850; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { margin: 12px 0 18px; font-size: clamp(36px, 6vw, 68px); line-height: 1.03; letter-spacing: -.045em; }
.hero-copy p { max-width: 690px; margin: 0 auto; color: rgba(255, 255, 255, .82); font-size: clamp(16px, 2vw, 19px); line-height: 1.65; }

.search-panel { max-width: 1120px; margin: 0 auto; }
.search-form {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(230px, .8fr) auto;
    gap: 15px;
    align-items: end;
    padding: 22px;
    color: var(--ink);
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.field { min-width: 0; position: relative; }
.field label { display: block; margin: 0 0 8px 4px; font-size: 13px; font-weight: 850; }
.field > small { display: block; min-height: 28px; padding: 7px 5px 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.input-shell { height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: #fff; border: 1px solid #bccfcc; border-radius: 15px; transition: .2s ease; }
.input-shell:focus-within { border-color: var(--medimed); box-shadow: 0 0 0 4px rgba(25, 163, 156, .12); }
.input-shell svg { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: var(--medimed); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.input-shell input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.input-shell input::placeholder { color: #81918e; }

.search-actions { display: flex; gap: 9px; padding-bottom: 28px; }
.button { min-height: 54px; padding: 0 20px; border: 0; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 850; text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(135deg, #f2a007, #e88700); box-shadow: 0 10px 24px rgba(232, 135, 0, .25); }
.button-primary:hover { box-shadow: 0 13px 28px rgba(232, 135, 0, .32); }
.button-primary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.button-ghost { color: var(--medimed); background: var(--medimed-lighter); }
.form-feedback { grid-column: 1 / -1; min-height: 0; margin: -8px 4px 0; color: #a13d08; font-size: 13px; font-weight: 700; }

.suggestions {
    position: absolute;
    top: calc(100% - 23px);
    left: 0;
    right: 0;
    max-height: 330px;
    overflow-y: auto;
    padding: 7px;
    z-index: 50;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(6, 61, 58, .18);
}
.suggestions button { width: 100%; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; color: var(--ink); background: transparent; border: 0; border-radius: 9px; cursor: pointer; }
.suggestions button:hover, .suggestions button[aria-selected="true"] { background: var(--medimed-lighter); }
.suggestions button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestions button small { flex: 0 0 auto; padding: 3px 7px; color: var(--medimed); background: var(--medimed-light); border-radius: 999px; font-size: 10px; font-weight: 800; }

.benefits { max-width: 1180px; margin: 0 auto; padding: 78px 24px; }
.benefits > div:first-child { max-width: 650px; }
.benefits h2, .update-notice h2 { margin: 9px 0 0; font-size: clamp(27px, 4vw, 42px); line-height: 1.15; letter-spacing: -.03em; }
.benefit-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.benefit-grid article { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.benefit-grid article > span { color: var(--orange); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.benefit-grid h3 { margin: 20px 0 10px; font-size: 19px; }
.benefit-grid p { margin: 0; color: var(--muted); line-height: 1.65; }

.update-notice { max-width: 1132px; margin: 0 auto 80px; padding: 28px 32px; display: flex; align-items: flex-start; gap: 19px; background: var(--medimed-lighter); border: 1px solid #cceae4; border-radius: 22px; }
.update-notice h2 { font-size: 21px; }
.update-notice p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.notice-icon { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: var(--medimed); border-radius: 50%; font-family: Georgia, serif; font-weight: bold; }

.site-footer { padding: 28px clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; gap: 18px; color: #72827f; background: #eaf3f1; border-top: 1px solid var(--line); font-size: 12px; }
.site-footer p { margin: 0; }

.loading-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 16px; color: white; background: rgba(6, 61, 58, .92); }
.spinner { width: 48px; height: 48px; border: 4px solid rgba(255, 255, 255, .25); border-top-color: var(--orange); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.results-page { background: #f5f8f7; }
.results-search { padding: 44px clamp(20px, 5vw, 72px) 34px; background: linear-gradient(135deg, var(--medimed-darker), var(--medimed)); color: white; }
.results-search-copy { max-width: 1180px; margin: 0 auto 24px; }
.results-search h1 { margin: 8px 0 0; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.035em; }
.search-form-compact { max-width: 1180px; margin: 0 auto; grid-template-columns: 1fr .8fr auto; }
.search-form-compact .field > small { display: none; }
.search-form-compact .search-actions { padding-bottom: 0; }
.search-form-compact .form-feedback { margin-top: 0; }
.search-form-compact .suggestions { top: calc(100% + 7px); }

.results-section { max-width: 1228px; min-height: 520px; margin: 0 auto; padding: 45px 24px 80px; }
.results-heading { margin-bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.results-heading h2 { margin: 10px 0 0; font-size: clamp(26px, 4vw, 39px); letter-spacing: -.035em; }
.results-heading h2 small { display: block; margin-top: 4px; color: var(--medimed); font-size: .55em; font-weight: 700; letter-spacing: 0; }
.results-heading > p { max-width: 460px; margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.result-count { display: inline-flex; padding: 6px 10px; color: var(--medimed); background: var(--medimed-light); border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.provider-card { padding: 25px; display: flex; flex-direction: column; gap: 19px; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 8px 24px rgba(6, 61, 58, .055); }
.provider-card-header { display: flex; align-items: flex-start; gap: 14px; }
.provider-icon { width: 45px; height: 45px; flex: 0 0 auto; display: grid; place-items: center; color: var(--medimed); background: var(--medimed-light); border-radius: 13px; }
.provider-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-kicker { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.provider-card h3 { margin: 0; font-size: 19px; line-height: 1.25; }
.service-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.service-tags span { padding: 6px 9px; color: var(--medimed-dark); background: var(--medimed-lighter); border: 1px solid #c6ddd7; border-radius: 8px; font-size: 11px; font-weight: 750; }
.unit-block { padding: 14px 16px; background: #f8fbfa; border-left: 3px solid var(--orange); border-radius: 4px 12px 12px 4px; }
.unit-block strong { display: block; font-size: 15px; }
.card-detail { display: flex; align-items: flex-start; gap: 11px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.card-detail svg { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 1px; fill: none; stroke: var(--medimed); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card-detail strong, .card-detail span { display: block; }
.card-detail strong { color: var(--ink); font-weight: 750; }

.empty-state { max-width: 680px; margin: 45px auto; padding: 54px 32px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 24px; }
.empty-state > span { width: 58px; height: 58px; margin: 0 auto; display: grid; place-items: center; color: var(--medimed); background: var(--medimed-light); border-radius: 50%; font-size: 27px; font-weight: 800; }
.empty-state h2 { margin: 19px 0 8px; font-size: 25px; }
.empty-state p { margin: 0 auto 24px; max-width: 470px; color: var(--muted); line-height: 1.6; }
.error-state > span { color: #9b3d1b; background: #fff0e9; }
.empty-state-alternatives { max-width: 820px; }
.empty-state-alternatives h2 { max-width: 650px; margin-left: auto; margin-right: auto; line-height: 1.3; }
.alternative-cities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: left; }
.alternative-cities a { min-height: 64px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--ink); background: var(--medimed-lighter); border: 1px solid #c6ddd7; border-radius: 12px; text-decoration: none; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.alternative-cities a:hover { transform: translateY(-1px); background: white; border-color: var(--medimed); }
.alternative-cities a strong { font-size: 14px; }
.alternative-cities a span { flex: 0 0 auto; color: var(--medimed); font-size: 12px; font-weight: 800; }

.pagination { margin-top: 34px; display: flex; justify-content: center; align-items: center; gap: 16px; }
.pagination a, .pagination span { min-height: 42px; padding: 0 15px; display: inline-flex; align-items: center; color: var(--medimed); background: white; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 800; }
.pagination span { color: var(--muted); font-weight: 650; }

@media (max-width: 930px) {
    .search-form, .search-form-compact { grid-template-columns: 1fr 1fr; }
    .search-actions { grid-column: 1 / -1; padding-bottom: 0; }
    .search-actions .button-primary { flex: 1; }
    .benefit-grid { grid-template-columns: 1fr; }
    .results-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 680px) {
    .site-header { min-height: 68px; padding: 11px 16px; }
    .brand-mark { width: 39px; height: 39px; }
    .brand strong { font-size: 18px; }
    .header-note { display: none; }
    .hero { padding: 48px 16px 62px; }
    .hero-copy { text-align: left; }
    .hero h1 { font-size: 40px; }
    .hero-copy p { font-size: 16px; }
    .search-form, .search-form-compact { grid-template-columns: 1fr; padding: 16px; border-radius: 19px; }
    .search-actions { grid-column: auto; flex-direction: column; }
    .search-actions .button { width: 100%; }
    .field > small { min-height: 0; }
    .suggestions { position: fixed; top: auto; left: 12px; right: 12px; bottom: 12px; max-height: min(55vh, 410px); }
    .benefits { padding: 58px 16px; }
    .benefit-grid article { padding: 23px; }
    .update-notice { margin: 0 16px 58px; padding: 22px; }
    .site-footer { flex-direction: column; text-align: center; }
    .results-search { padding: 33px 16px 24px; }
    .results-section { padding: 32px 14px 60px; }
    .result-grid { grid-template-columns: 1fr; }
    .provider-card { padding: 20px; border-radius: 18px; }
    .empty-state-alternatives { padding: 38px 18px; }
    .alternative-cities { grid-template-columns: 1fr; }
    .pagination { flex-wrap: wrap; gap: 8px; }
}
