/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue-600: #cc0100;
    --blue-700: #a80000;
    --blue-800: #8a0000;
    --blue-50: #fff5f5;
    --blue-100: #ffe0e0;
    --blue-200: #ffb3b3;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #fff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-800); text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ── Header ──────────────────────────────────────────── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 1rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--blue-700);
    white-space: nowrap;
    flex-shrink: 0;
}
.logo:hover { text-decoration: none; color: var(--blue-800); }
.logo svg { flex-shrink: 0; }
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.25rem;
}
.main-nav a {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--gray-600);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: all .15s ease;
}
.main-nav a:hover { background: var(--gray-100); color: var(--blue-700); text-decoration: none; }
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.nav-btn {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--blue-700);
    padding: 0.4rem 1rem;
    border: 1px solid var(--blue-600);
    border-radius: var(--radius);
    white-space: nowrap;
    transition: all .15s ease;
}
.nav-btn:hover { background: var(--blue-600); color: var(--white); text-decoration: none; }
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gray-700);
    border-radius: 1px;
    transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        padding: 0.5rem 1rem;
        box-shadow: var(--shadow-md);
        gap: 0;
        z-index: 999;
    }
    .main-nav.open { display: flex; }
    .main-nav a {
        padding: 0.75rem 0.5rem;
        font-size: 0.95rem;
        border-bottom: 1px solid var(--gray-100);
    }
    .main-nav a:last-child { border-bottom: none; }
}

/* ── Breadcrumbs ─────────────────────────────────────── */
.breadcrumbs {
    padding: 1rem 0 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}
.breadcrumbs a { color: var(--blue-700); }
.breadcrumbs a:hover svg { color: var(--blue-800); }
.breadcrumbs strong { color: var(--gray-700); font-weight: 600; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 2.5rem 0 1.5rem;
}
.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}
.subtitle {
    color: var(--gray-500);
    font-size: 1.1rem;
}

/* ── Search section (homepage – 2 boxes centered) ────── */
.search-section {
    padding: 1rem 0 2rem;
}
.search-boxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}
.search-box-wrapper label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}
.search-box {
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    background: var(--white);
    outline: none;
    transition: border-color .15s ease;
    font-family: inherit;
}
.search-box input:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(204, 1, 0, 0.1);
}
.search-box input::placeholder { color: var(--gray-400); }
.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--blue-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
    z-index: 2;
}
.search-btn:hover { background: var(--blue-700); }
.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 100;
    margin-top: 0.25rem;
    max-height: 320px;
    overflow-y: auto;
}
.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
    transition: background .1s ease;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--blue-50); text-decoration: none; }
.search-item strong { font-weight: 600; }
.search-item span { font-size: 0.8rem; color: var(--gray-500); }

/* ── Maps ────────────────────────────────────────────── */
.map-section { margin: 1.5rem 0; }
.map-full, .map-region, .map-city, .map-chain {
    height: 450px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    z-index: 1;
}
.map-region { height: 380px; }
.map-city { height: 350px; }
.map-detail {
    height: 280px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
    z-index: 1;
}

/* ── Map lazy-load overlay ───────────────────────────── */
.map-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(2px);
    border-radius: var(--radius-lg);
}
.map-overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--blue-600);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: background .15s ease;
}
.map-overlay-btn:hover {
    background: var(--blue-700);
}
.map-overlay-loading {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--gray-600);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* ── Section titles ──────────────────────────────────── */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

/* ── Regions grid ────────────────────────────────────── */
.regions-section { padding: 2rem 0; }
.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.region-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: all .15s ease;
    display: block;
}
.region-card:hover {
    border-color: var(--blue-600);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transform: translateY(-2px);
}
.region-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}
.region-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ── Specializations grid ────────────────────────────── */
.specs-section { padding: 1rem 0 2rem; }
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}
.spec-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: all .15s ease;
    display: block;
}
.spec-card:hover {
    border-color: var(--blue-600);
    box-shadow: var(--shadow);
    text-decoration: none;
    transform: translateY(-1px);
}
.spec-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.15rem;
}
.spec-card p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ── Cities grid ─────────────────────────────────────── */
.cities-section { padding: 1.5rem 0 2rem; }
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.city-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: all .15s ease;
    display: block;
}
.city-card:hover {
    border-color: var(--blue-600);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.city-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}
.city-card p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.15rem;
}

/* ── Doctor cards (listing) ──────────────────────────── */
.doctor-list { padding: 1rem 0 2rem; }
.doctor-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    transition: all .15s ease;
}
.doctor-card:hover {
    border-color: var(--blue-600);
    box-shadow: var(--shadow);
}
.doctor-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.35rem;
}
.doctor-card h3 a { color: var(--blue-700); }
.doctor-card h3 a:hover { color: var(--blue-800); }
.card-address {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.35rem;
}
.card-phone {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}
.card-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue-700);
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--blue-600);
    border-radius: var(--radius);
    transition: all .15s ease;
}
.card-link:hover {
    background: var(--blue-600);
    color: var(--white);
    text-decoration: none;
}
.card-spec {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    margin-right: 5px;
    margin-bottom: 0.3rem;
}
.card-rep {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
    font-style: italic;
    margin-bottom: 0.25rem;
}

/* ── Homepage insurance tiles ────────────────────────── */
.insurers-hp-section { margin-top: 2rem; }
.ins-hp-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}
.ins-hp-tile {
    flex: 1 1 300px;
    max-width: calc(33.333% - 0.85rem);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.ins-hp-tile:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transform: translateY(-3px);
    border-color: var(--blue-200);
    text-decoration: none;
}
.ins-hp-logo {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 8px;
}
.ins-hp-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}
.ins-hp-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
}
.ins-hp-fullname {
    font-size: 0.78rem;
    color: var(--gray-500);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ins-hp-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue-700);
    margin-top: 0.2rem;
}
.ins-hp-arrow {
    flex-shrink: 0;
    font-size: 1.4rem;
    color: var(--gray-300);
    transition: color .2s ease, transform .2s ease;
}
.ins-hp-tile:hover .ins-hp-arrow {
    color: var(--blue-700);
    transform: translateX(3px);
}

/* ── Insurance landing header ────────────────────────── */
.ins-landing-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}
.ins-landing-header > div { flex: 1; min-width: 0; }
.ins-landing-header { margin-bottom: 20px; }
.ins-landing-logo {
    flex-shrink: 0;
    width: auto;
    height: 110px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: calc(0.5rem + 15px);
    background: var(--white);
}
@media (max-width: 768px) {
    .ins-landing-logo { height: 70px; padding: 0.35rem; }
    .ins-landing-header h1 { font-size: 1.2rem; }
    .ins-landing-header .subtitle { font-size: 0.85rem; }
}
@media (max-width: 480px) {
    .ins-landing-header { gap: 1rem; }
    .ins-landing-logo { height: 50px; padding: 0.25rem; }
    .ins-landing-header h1 { font-size: 1.05rem; }
    .ins-landing-header .subtitle { font-size: 0.8rem; }
}

/* ── Related doctors sections ────────────────────────── */
.related-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}
.related-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
}
.related-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.related-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}
.related-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}
.related-card h3 a { color: var(--blue-700); text-decoration: none; }
.related-card h3 a:hover { text-decoration: underline; }
.related-addr {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin: 0 0 0.1rem;
    line-height: 1.35;
}
.related-phone {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin: 0 0 0.4rem;
}
.related-btn {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.35rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--blue-700);
    border: 1px solid var(--blue-600);
    border-radius: var(--radius);
    text-decoration: none;
    text-align: center;
    transition: all .15s ease;
    align-self: flex-start;
}
.related-btn:hover {
    background: var(--blue-600);
    color: var(--white);
    text-decoration: none;
}
.related-card .card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 0.25rem;
}
.related-card .card-spec {
    margin-right: 0;
    margin-bottom: 0;
}
.related-card .card-rep {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-500);
    font-style: italic;
    margin-bottom: 0.2rem;
}
.related-more {
    margin-top: 0.75rem;
    margin-bottom: 0;
}
.related-more a {
    display: block;
    padding: 0.45rem 1rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--blue-700);
    border: 1px solid var(--blue-600);
    border-radius: var(--radius);
    text-decoration: none;
    text-align: center;
    transition: all .15s ease;
}
.related-more a:hover {
    background: var(--blue-600);
    color: var(--white);
    text-decoration: none;
}

/* ── Doctor detail ───────────────────────────────────── */
.doctor-detail { padding: 1.5rem 0 2rem; }
.doctor-detail h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}
.facility-description {
    font-size: 0.92rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    max-width: 800px;
}
.spec-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
    margin-bottom: 1.5rem;
}
.spec-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    margin-right: 8px;
    background: var(--blue-50);
    color: var(--blue-700);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.spec-badge:hover {
    background: var(--blue-100);
    border-color: var(--blue-600);
}
.expert-rep {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.dept-heading {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--blue-700);
    margin: 1rem 0 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--blue-100);
}
.dept-heading:first-child { margin-top: 0; }
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.detail-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}
.detail-section h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-100);
}
.address-block {
    line-height: 1.8;
    color: var(--gray-700);
}
.multi-addr {
    padding: 0.3rem 0;
    line-height: 1.6;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gray-100);
}
.multi-addr:last-child { border-bottom: none; }
.multi-addr strong {
    color: var(--gray-800);
}
.contact-item {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--gray-700);
}
.contact-item .label {
    font-weight: 600;
    color: var(--gray-600);
}
.detail-row {
    padding: 0.35rem 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}
.detail-row .label {
    font-weight: 600;
    color: var(--gray-500);
}

/* ── Transport (Doprava) section ──────────────────────── */
.nearby-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.nearby-item:last-child { border-bottom: none; }
.nearby-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--blue-50);
    border-radius: 50%;
    flex-shrink: 0;
}
.nearby-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
}
.nearby-value {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--gray-500);
}
.walk-icon {
    vertical-align: -2px;
    opacity: 0.7;
}

/* ── Ordinace a lékaři (departments) ──────────────────── */
.dept-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.dept-item:last-child { border-bottom: none; }
.dept-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}
.dept-specs .spec-badge {
    font-size: 0.78rem;
}
.dept-doctor {
    padding: 0.2rem 0 0.2rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}
.dept-doctor-name {
    font-size: 0.9rem;
    color: var(--gray-700);
}
.dept-doctor-contact {
    font-size: 0.82rem;
    color: var(--gray-500);
}
.dept-doctor-contact a {
    color: var(--blue-600);
    text-decoration: none;
}
.dept-doctor-contact a:hover {
    text-decoration: underline;
}

/* ── Department cards (ordinace) ─────────────────────── */
.dept-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.dept-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    transition: border-color .15s ease;
    min-width: 0;
}
.dept-card:hover {
    border-color: var(--gray-300);
}
.dept-card-header {
    padding: 0.75rem 1rem 0.5rem;
    border-bottom: 1px solid var(--gray-100);
    overflow-wrap: break-word;
    word-break: break-word;
}
.dept-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
}
.dept-card-specs .spec-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    margin-right: 0;
}
.dept-card-provider {
    font-size: 0.82rem;
    color: var(--gray-500);
    font-weight: 500;
}
.dept-card-body {
    padding: 0.5rem 1rem 0.75rem;
}
.dept-card-doctor {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}
.dept-card-contact {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    overflow-wrap: break-word;
    word-break: break-word;
}
.dept-card-contact a {
    color: var(--blue-600);
    text-decoration: none;
}
.dept-card-contact a:hover {
    text-decoration: underline;
}
.dept-hours-mini {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    table-layout: fixed;
}
.dept-hours-mini th {
    text-align: left;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--gray-200);
}
.dept-hours-mini td {
    padding: 0.2rem 0.5rem;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-50);
    overflow-wrap: break-word;
    word-break: break-word;
}
.ordinace-section {
}
.ordinace-section h2 {
}

/* ── Opening hours table ─────────────────────────────── */
.hours-table {
    width: 100%;
    border-collapse: collapse;
}
.hours-table th, .hours-table td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}
.hours-table th {
    color: var(--gray-500);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
}
.hours-table td {
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}
.hours-table tr.open td:first-child {
    font-weight: 600;
    color: var(--gray-800);
}
.hours-table tr.open td { color: var(--gray-700); }
.hours-table tr.closed td {
    color: var(--gray-400);
    font-style: italic;
}

/* ── "Právě otevřeno" indicator ─────────────────────── */
.open-now-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-700);
    background: var(--green-50);
    border: 1px solid var(--green-100);
    border-radius: var(--radius);
}
.open-now-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--green-600);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(22, 163, 74, 0); }
}

/* ── Contact page ────────────────────────────────────── */
.contact-page {
    max-width: 600px;
    padding: 2rem 0;
}
.contact-page h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}
.contact-page p {
    margin-bottom: 1rem;
    color: var(--gray-700);
}
.contact-email a {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ── Error page ──────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 4rem 0;
}
.error-page h1 {
    font-size: 2rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
}
.error-page p { color: var(--gray-500); margin-bottom: 2rem; }
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--blue-600);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    transition: background .15s ease;
}
.btn:hover { background: var(--blue-700); text-decoration: none; color: var(--white); }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-500);
}
.site-footer p { margin-bottom: 0.25rem; }
.site-footer a { color: var(--gray-600); }

/* ── Text muted ──────────────────────────────────────── */
.text-muted { color: var(--gray-400); font-style: italic; }

/* ── Nearby (parking, MHD) ──────────────────────────── */
.nearby-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.nearby-item:last-child { border-bottom: none; }
.nearby-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-50);
    border-radius: 50%;
    margin-top: 0.1rem;
}
.nearby-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    line-height: 1.3;
}
.nearby-value {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.1rem;
}
.walk-icon {
    flex-shrink: 0;
    color: var(--gray-400);
}

.insurance-section { }
.ins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
}
.ins-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.5rem 0.6rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background: var(--white);
    gap: 0.35rem;
    transition: border-color .15s ease;
}
.ins-card--yes { border-color: var(--green-100); background: var(--green-50); }
.ins-card--no { border-color: #fecaca; background: #fef2f2; }
.ins-card--unknown { border-color: var(--gray-200); background: var(--gray-50); }
.ins-card-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.ins-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}
.ins-badge--yes { background: var(--green-600); }
.ins-badge--no { background: #ef4444; }
.ins-badge--unknown { background: var(--gray-400); }
.ins-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}
.ins-card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
}
.ins-status--yes { color: var(--green-700); background: var(--green-100); }
.ins-status--no { color: #dc2626; background: #fecaca; }
.ins-status--unknown { color: var(--gray-500); background: var(--gray-200); }
.ins-card-link {
    font-size: 0.7rem;
    color: var(--blue-700);
    text-decoration: none;
    margin-top: auto;
}
.ins-card-link:hover { text-decoration: underline; }
.insurance-note {
    margin-top: 0.75rem;
    font-size: 0.7rem;
    color: var(--gray-400);
    line-height: 1.4;
}

/* ── Nearby facilities grid ─────────────────────────── */
.nearby-facilities-section {
    margin-top: 1.5rem;
}
.nearby-facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.6rem;
}
.nearby-facility {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.nearby-facility:hover {
    border-color: var(--blue-600);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
.nearby-facility-cat {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.nearby-facility-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    line-height: 1.3;
}

/* ── Edit link ──────────────────────────────────────── */
.edit-link { text-align: right; margin-top: 0.5rem; }
.edit-link a { font-size: 0.75rem; color: var(--gray-400); text-decoration: none; }
.edit-link a:hover { color: var(--gray-600); text-decoration: underline; }

/* ── Leaflet popup ───────────────────────────────────── */
.leaflet-popup-content { font-family: inherit; font-size: 0.875rem; }
.leaflet-popup-content a { color: var(--blue-700); font-weight: 600; }
.leaflet-popup-content .popup-address { color: var(--gray-500); font-size: 0.8rem; margin: 0.25rem 0 0; }
.leaflet-popup-content .popup-detail {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--blue-700);
    text-decoration: underline;
    font-weight: 400;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.5rem; }
    .search-boxes { grid-template-columns: 1fr; gap: 1rem; }
    .container > h1, .doctor-detail h1 { font-size: 1.35rem; }
    .map-full, .map-region, .map-city { height: 300px; }
    .detail-grid { grid-template-columns: 1fr; }
    .regions-grid { grid-template-columns: 1fr 1fr; }
    .cities-grid { grid-template-columns: 1fr 1fr; }
    .specs-grid { grid-template-columns: 1fr 1fr; }
    .logo span { font-size: 0.95rem; }
    .ins-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; }
    .ins-hp-tile { max-width: 100%; }
    .ins-hp-logo { width: 48px; height: 48px; }
}
@media (max-width: 480px) {
    .regions-grid { grid-template-columns: 1fr; }
    .cities-grid { grid-template-columns: 1fr; }
    .specs-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.25rem; }
    .container > h1, .doctor-detail h1 { font-size: 1.15rem; }
    .map-full, .map-region, .map-city { height: 250px; }
    .logo span { font-size: 0.85rem; }
}

/* ── Category badges ────────────────────────────────── */
.category-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}
.cat-nemocnice {
    background: #fff5f5;
    color: #cc0100;
    border: 1px solid #ffe0e0;
}
.cat-poliklinika {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}
.cat-pohotovost {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.cat-lekarsky-dum {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.cat-nasledna-pece {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
.cat-porodnice {
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid #fbcfe8;
}

/* ── Category card icon ─────────────────────────────── */
.category-card {
    text-align: center;
    padding: 1.5rem 1.25rem;
}
.category-card .cat-icon {
    margin-bottom: 0.5rem;
    color: var(--blue-600);
}
.category-grid {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 768px) {
    .category-grid { grid-template-columns: 1fr; }
}

/* ── Doctor listing overrides ───────────────────────── */
.doctors-list { padding: 1rem 0 2rem; }
.doctor-addr {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.35rem;
}
.doctor-phone {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

/* ── Facility photos ──────────────────────────────── */
.facility-photo {
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}
.facility-photo img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    display: block;
}
.photo-credit {
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    color: var(--gray-400);
    background: var(--gray-50);
    text-align: right;
}

/* ── Card with photo ──────────────────────────────── */
.doctor-card.has-photo {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}
.card-photo {
    flex: 0 0 160px;
    overflow: hidden;
    border-radius: var(--radius) 0 0 var(--radius);
    margin: -1.25rem 0 -1.25rem -1.5rem;
}
.card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 120px;
}
.card-body {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .facility-photo img { max-height: 180px; }
    .doctor-card.has-photo { flex-direction: column; }
    .card-photo {
        flex: none;
        margin: -1.25rem -1.5rem 0.75rem -1.5rem;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        height: 150px;
    }
}

/* ── Birth Statistics ─────────────────────────────────── */
.birth-stats-section { margin-top: 2rem; }

.birth-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
}
.birth-type-pcip { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.birth-type-pcimp { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.birth-type-basic { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }

.birth-metrics {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.birth-metric {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 120px;
    flex: 1;
}
.birth-metric-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}
.birth-metric-label {
    display: block;
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.birth-charts {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.birth-chart {
    flex: 1;
    min-width: 260px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
}
.birth-chart h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    text-align: center;
}
.birth-chart canvas { max-width: 100%; }
.birth-chart-pie { flex: 0 0 auto; max-width: 310px; }
.birth-chart-pie canvas { max-height: 240px; }
.birth-chart-trend { flex: 1; }
.birth-header-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.birth-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    vertical-align: middle;
}
.birth-trend-badge.birth-trend-sm {
    font-size: 0.82rem;
    padding: 0.1rem 0.35rem;
}
.birth-trend-badge .trend-arrow {
    flex-shrink: 0;
}
.birth-trend-badge.trend-up {
    color: #16a34a;
    background: #f0fdf4;
}
.birth-trend-badge.trend-down {
    color: #dc2626;
    background: #fef2f2;
}
.birth-trend-badge.trend-flat {
    color: var(--gray-500);
    background: var(--gray-100);
}

.birth-share {
    font-size: 0.95rem;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.birth-extras {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.birth-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}
.birth-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.birth-table th {
    background: var(--gray-50);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}
.birth-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--gray-100);
    white-space: nowrap;
}
.birth-table tbody tr:hover { background: var(--gray-50); }

.birth-source {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 0.5rem;
}
.birth-source a { color: var(--gray-500); text-decoration: underline; }

/* Birth stats in category listing cards */
.card-births {
    font-size: 0.82rem;
    color: #db2777;
    font-weight: 500;
    margin: 0.25rem 0 0.5rem;
}

@media (max-width: 640px) {
    .birth-metrics { flex-direction: column; gap: 0.75rem; }
    .birth-metric { min-width: unset; }
    .birth-charts { flex-direction: column; }
    .birth-chart { min-width: unset; }
    .birth-table { font-size: 0.78rem; }
    .birth-table th, .birth-table td { padding: 0.4rem 0.5rem; }
}
