/* SIMP Experts - Custom Styles */

:root {
    --simp-green: #07883F;
    --simp-green-dark: #08783B;
    --simp-green-light: #e8f5e9;
    --simp-header-green: #0a5c2e;
    --simp-ink: #102235;
    --simp-muted: #6b756f;
    --simp-border: #DDE6E1;
    --simp-page-bg: #F5F7F6;
    --simp-header-h: 6.25rem;
    --simp-slant: 1.1rem;
    --simp-slant-angle: -10deg;
    --expert-aside-w: 168px;
    --expert-aside-h: 272px;
    --expert-avatar-w: 116px;
    --expert-avatar-h: 145px;
    --expert-number-h: 42px;
}

body {
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    background: var(--simp-page-bg);
    color: var(--simp-ink);
}

/* Rezerwuj miejsce na ikony zanim doładuje się bootstrap-icons (CLS). */
i.bi {
    display: inline-block;
    width: 1em;
    height: 1em;
    line-height: 1;
    flex-shrink: 0;
    vertical-align: -0.125em;
}

/* SIMP branding */
.bg-simp {
    background-color: var(--simp-green) !important;
}

.text-simp {
    color: var(--simp-green) !important;
}

a.text-simp:hover,
a.text-simp:focus {
    color: var(--simp-green-dark) !important;
}

.btn-simp {
    background-color: var(--simp-green);
    border-color: var(--simp-green);
    color: white;
}

.btn-simp:hover {
    background-color: var(--simp-green-dark);
    border-color: var(--simp-green-dark);
    color: white;
}

.btn-outline-simp {
    background-color: transparent;
    border-color: var(--simp-green);
    color: var(--simp-green);
}

.btn-outline-simp:hover,
.btn-outline-simp:focus,
.btn-outline-simp:active {
    background-color: var(--simp-green);
    border-color: var(--simp-green);
    color: white;
}

.btn-check:checked + .btn-outline-simp {
    background-color: var(--simp-green);
    border-color: var(--simp-green);
    color: white;
}

/* Bootstrap switches / checkboxes in SIMP green */
.form-check-input:checked {
    background-color: var(--simp-green);
    border-color: var(--simp-green);
}

.form-check-input:focus {
    border-color: var(--simp-green);
    box-shadow: 0 0 0 0.25rem rgba(27, 143, 58, 0.25);
}

.form-switch .form-check-input:focus {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
    background-color: var(--simp-green);
    border-color: var(--simp-green);
}

/* Pagination — SIMP green, centered */
.pagination {
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 0;
}

.page-link {
    color: var(--simp-green);
}

.page-link:hover,
.page-link:focus {
    color: var(--simp-green-dark);
    background-color: var(--simp-green-light);
    border-color: #c3e6cb;
    box-shadow: 0 0 0 0.2rem rgba(27, 143, 58, 0.2);
}

.page-item.active .page-link {
    background-color: var(--simp-green);
    border-color: var(--simp-green);
    color: #fff;
}

.page-item.disabled .page-link {
    color: #6c757d;
}

/* Toggle contact button customization */
.toggle-contact.btn-outline-simp {
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(27, 143, 58, 0.15);
}

.toggle-contact.btn-outline-simp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 143, 58, 0.35);
}

/* Custom SIMP Alerts for Map */
.alert-simp {
    background-color: var(--simp-green-light);
    border-color: #c3e6cb;
    color: var(--simp-green-dark);
    border-left: 4px solid var(--simp-green);
}

.alert-simp-selected {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: var(--simp-green);
    color: var(--simp-green-dark);
    border-left: 4px solid var(--simp-green);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(27, 143, 58, 0.15);
}

/* Site header — SIMP identity bar */
.site-header {
    position: relative;
    z-index: 1030;
    background: #fff;
    border-bottom: 1px solid #e4ebe6;
    box-shadow: 0 2px 10px rgba(10, 92, 46, 0.06);
}

.site-header__bar {
    position: relative;
    min-height: var(--simp-header-h);
    overflow: hidden;
}

.site-header__row {
    display: flex;
    align-items: stretch;
    min-height: var(--simp-header-h);
    padding-left: 0;
    padding-right: 0;
}

.site-header__top {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    flex: 0 1 auto;
    min-width: 0;
}

.site-header__brand {
    display: flex;
    align-items: stretch;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 26rem;
    text-decoration: none;
    color: inherit;
}

.site-header__logo-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 7.75rem;
    margin-right: 0.35rem;
    padding: 0.75rem calc(0.85rem + var(--simp-slant)) 0.75rem 0.85rem;
    background: linear-gradient(165deg, #0d6b35 0%, var(--simp-header-green) 55%, #074421 100%);
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--simp-slant)) 100%, 0 100%);
}

.site-header__logo-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 42%),
        repeating-linear-gradient(
            -18deg,
            transparent 0,
            transparent 10px,
            rgba(255, 255, 255, 0.04) 10px,
            rgba(255, 255, 255, 0.04) 11px
        );
    pointer-events: none;
}

.site-header__logo {
    position: relative;
    z-index: 1;
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.site-header__brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.85rem 1rem 0.85rem 0.15rem;
    min-width: 0;
}

.site-header__title {
    display: block;
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    font-size: clamp(1.05rem, 1.9vw, 1.35rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--simp-ink);
}

.site-header__subtitle {
    display: block;
    font-size: 0.78rem;
    line-height: 1.3;
    color: var(--simp-muted);
    font-weight: 400;
    max-width: 16rem;
}

.site-header__toggler {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    align-self: center;
    margin: 0 0.75rem 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid #d7ddd9;
    border-radius: 8px;
    background: #fff;
    color: var(--simp-header-green);
    font-size: 1.45rem;
    line-height: 1;
}

.site-header__toggler:hover {
    background: var(--simp-green-light);
}

.site-header__collapse {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0.5rem;
    border-left: 0;
}

@media (min-width: 992px) {
    .site-header__collapse.collapse {
        display: flex !important;
        height: auto !important;
        visibility: visible !important;
    }
}

.site-header__nav {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
}

.site-header__link {
    position: relative;
    display: grid;
    grid-template-rows: 1.35rem 2.6em;
    align-content: center;
    justify-items: center;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-width: 0;
    padding: 0.75rem 0.95rem;
    text-decoration: none;
    color: var(--simp-ink);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.site-header__link--tall {
    grid-template-rows: 1.35rem 3.9em;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

.site-header__link > span {
    max-width: 8.5rem;
    width: 100%;
    min-height: 2.6em;
    display: block;
    overflow: hidden;
    align-self: start;
}

.site-header__link > span.site-header__link-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    max-width: none;
    width: auto;
}

.site-header__link-stack > span {
    display: block;
    min-height: 0;
    max-width: none;
    width: auto;
    overflow: visible;
}

.site-header__link--tall span {
    max-width: 7.25rem;
    min-height: 3.9em;
    -webkit-line-clamp: 3;
}

.site-header__link i {
    font-size: 1.15rem;
    line-height: 1;
    height: 1.35rem;
    color: #4a554e;
    transition: color 0.2s ease;
    align-self: end;
}

.site-header__link:hover {
    color: var(--simp-header-green);
    background: rgba(10, 92, 46, 0.04);
}

.site-header__link:hover i {
    color: var(--simp-header-green);
}

.site-header__link.is-active {
    color: var(--simp-header-green);
    font-weight: 600;
}

.site-header__link.is-active i {
    color: var(--simp-header-green);
}

.site-header__link.is-active::after {
    content: "";
    position: absolute;
    left: 22%;
    right: 22%;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--simp-header-green);
}

.site-header__login {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 0 0 6.5rem;
    align-self: stretch;
    margin: 0;
    padding: 0.75rem 0.85rem 0.75rem calc(0.85rem + var(--simp-slant));
    border-radius: 0;
    background: linear-gradient(195deg, #0d6b35 0%, var(--simp-header-green) 55%, #074421 100%);
    clip-path: polygon(var(--simp-slant) 0, 100% 0, 100% 100%, 0 100%);
    color: #fff !important;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.15;
    transition: filter 0.2s ease;
}

.site-header__login::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(225deg, rgba(255, 255, 255, 0.12) 0%, transparent 42%),
        repeating-linear-gradient(
            18deg,
            transparent 0,
            transparent 10px,
            rgba(255, 255, 255, 0.04) 10px,
            rgba(255, 255, 255, 0.04) 11px
        );
    pointer-events: none;
}

.site-header__login i,
.site-header__login span {
    position: relative;
    z-index: 1;
}

.site-header__login i {
    font-size: 1.45rem;
    line-height: 1;
}

.site-header__login:hover {
    background: linear-gradient(195deg, #0b5c2e 0%, #084a25 55%, #06381c 100%);
    color: #fff !important;
    filter: brightness(1.06);
}

@media (max-width: 991.98px) {
    .site-header__toggler {
        display: inline-flex;
    }

    .site-header__row {
        flex-wrap: wrap;
        min-height: 0;
    }

    .site-header__top {
        flex: 1 1 100%;
        width: 100%;
        min-height: var(--simp-header-h);
    }

    .site-header__brand {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }

    .site-header__collapse {
        flex: 1 1 100%;
        flex-direction: column;
        margin-left: 0;
        border-left: 0;
        border-top: 1px solid #e2e8e4;
    }

    .site-header__collapse:not(.show) {
        display: none;
    }

    .site-header__collapse.show {
        display: flex;
    }

    .site-header__nav {
        flex-direction: column;
        justify-content: flex-start;
    }

    .site-header__link {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 0.75rem;
        flex: 1 1 auto;
        min-width: 0;
        padding: 0.85rem 1.1rem;
        text-align: left;
        border-bottom: 1px solid #eef2ef;
        grid-template-rows: none;
    }

    .site-header__link i {
        height: auto;
        align-self: center;
    }

    .site-header__link > span,
    .site-header__link--tall span {
        min-height: 0;
        width: auto;
        max-width: none;
        align-self: center;
        text-align: left;
        display: inline;
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    .site-header__link > span.site-header__link-stack {
        display: inline;
        flex-direction: row;
    }

    .site-header__link-stack > span {
        display: inline;
    }

    .site-header__link-stack > span:first-child::after {
        content: "\00a0";
    }

    .site-header__link span br {
        display: none;
    }

    .site-header__link--tall {
        grid-template-rows: none;
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .site-header__link.is-active::after {
        left: 0;
        right: auto;
        top: 18%;
        bottom: 18%;
        width: 3px;
        height: auto;
        border-radius: 0 3px 3px 0;
    }

    .site-header__login {
        flex: 1 1 auto;
        flex-direction: row;
        gap: 0.5rem;
        min-height: 3.25rem;
        margin: 0;
        padding: 0.85rem 1.1rem 0.85rem calc(1.1rem + var(--simp-slant));
        align-self: stretch;
        clip-path: polygon(var(--simp-slant) 0, 100% 0, 100% 100%, 0 100%);
    }
}

@media (max-width: 575.98px) {
    .site-header {
        --simp-header-h: 5.25rem;
        --simp-slant: 0.85rem;
    }

    .site-header__bar,
    .site-header__row,
    .site-header__top {
        min-height: var(--simp-header-h);
    }

    .site-header__logo-panel {
        flex-basis: 5.75rem;
        padding: 0.55rem calc(0.65rem + var(--simp-slant)) 0.55rem 0.65rem;
    }

    .site-header__logo {
        width: 64px;
        height: 64px;
    }

    .site-header__title {
        font-size: 1rem;
    }

    .site-header__subtitle {
        font-size: 0.7rem;
        max-width: 11rem;
    }
}

/* Claim banner */
.claim-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.claim-banner strong {
    font-size: 1.1rem;
    letter-spacing: 0.3px;
}

.claim-banner .bi-shield-check {
    font-size: 1.2rem;
    margin-right: 8px;
}

/* Expert Cards */
.expert-results {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.expert-card {
    position: relative;
    margin: 0;
    border: 0;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 18px rgba(16, 34, 53, 0.07);
    color: var(--simp-ink);
    min-height: var(--expert-aside-h);
    height: auto;
}

.expert-card__profile-link {
    position: absolute;
    right: 0.65rem;
    bottom: 0.45rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
    color: var(--simp-green-dark);
    background: none;
    border: 0;
    box-shadow: none;
    text-decoration: none;
    line-height: 1;
    opacity: 0.5;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.expert-card__profile-link .bi-person-vcard {
    font-size: 1.05rem;
}

.expert-card__profile-link-arrow {
    font-size: 1.05rem;
    margin-left: -0.1rem;
}

.expert-card__profile-link:hover,
.expert-card__profile-link:focus-visible {
    color: var(--simp-green);
    opacity: 1;
    outline: none;
}

.expert-profile-page__header {
    text-align: center;
}

.expert-profile-page__h1 {
    margin: 0 0 0.35rem;
    color: var(--simp-ink);
    font-size: clamp(1.45rem, 2.4vw, 1.85rem);
    font-weight: 700;
    line-height: 1.25;
}

.expert-profile-page__place {
    color: #5a6b7d;
    font-size: 0.98rem;
}

.expert-profile-page__place .bi {
    color: var(--simp-green);
    margin-right: 0.25rem;
}

.expert-profile-page__section-title {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--simp-ink);
}

.expert-profile-page__unit-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--simp-ink);
}

.expert-profile-page__unit-address {
    color: #5a6b7d;
}

.expert-profile-page__unit-address .bi {
    color: var(--simp-green);
    margin-right: 0.2rem;
}

.expert-card__layout {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: var(--expert-aside-h);
    height: 100%;
}

.expert-card__aside {
    position: relative;
    z-index: 2;
    /* stała szerokość — taka sama dla każdej karty */
    flex: 0 0 var(--expert-aside-w);
    width: var(--expert-aside-w);
    min-width: var(--expert-aside-w);
    max-width: var(--expert-aside-w);
    align-self: stretch;
    min-height: var(--expert-aside-h);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #012022;
    /* visible — żeby cień avatara nie był ucinany */
    overflow: visible;
}

.expert-card__aside-art {
    /* grafiką wypełnia belkę nad zielonym paskiem (42px) */
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: var(--expert-number-h);
    overflow: hidden;
    background-color: #012022;
    background-image: var(--expert-aside-art, none);
    background-position: left top;
    background-size: cover;
    background-repeat: no-repeat;
}

.expert-card__aside-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: left top;
    display: block;
    pointer-events: none;
    user-select: none;
}

.expert-card__avatar {
    position: absolute;
    right: 0;
    top: calc(1.15rem + 15px);
    bottom: auto;
    z-index: 5;
    width: var(--expert-avatar-w);
    height: var(--expert-avatar-h);
    /* stała odległość od góry; ~80% na zielonym, ~20% na białym */
    transform: translateX(20%);
    border-radius: 15px;
    background: #eef3f0;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: none;
    filter: drop-shadow(0 8px 16px rgba(16, 34, 53, 0.18))
            drop-shadow(0 2px 4px rgba(16, 34, 53, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
}

.expert-card__avatar:has(.expert-card__avatar-photo.is-loaded) {
    opacity: 1;
}

.expert-card__avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 0;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.expert-card__aside-number {
    position: relative;
    z-index: 3;
    flex: 0 0 var(--expert-number-h);
    height: var(--expert-number-h);
    min-height: var(--expert-number-h);
    max-height: var(--expert-number-h);
    margin-top: auto;
    padding: 0 0.75rem;
    padding-right: 0.75rem;
    box-sizing: border-box;
    background: var(--simp-green);
    color: #fff;
    font-size: 0.99rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.expert-card--has-photo .expert-card__aside-number {
    padding-right: calc(var(--expert-avatar-w) * 0.32 + 0.5rem);
}

.expert-card__aside-number-label {
    font-weight: 600;
    opacity: 0.95;
}

.expert-card__aside-number--empty {
}

.expert-card__main {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

.expert-card__content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.85rem 1.25rem 0.75rem 1.15rem;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.expert-card:has(.expert-card__profile-link) .expert-card__content,
.expert-card:has(.expert-card__catalog-preview) .expert-card__content {
    padding-bottom: 2.35rem;
}

.expert-card__catalog-preview {
    position: absolute;
    right: 0.85rem;
    bottom: 0.55rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--simp-green-dark);
    text-decoration: none;
    line-height: 1.2;
}

.expert-card__catalog-preview:hover,
.expert-card__catalog-preview:focus {
    color: var(--simp-green);
    text-decoration: underline;
}

.expert-card__catalog-preview--note {
    font-weight: 500;
    color: var(--simp-muted);
}

.expert-card--has-photo .expert-card__content {
    padding-left: calc(var(--expert-avatar-w) * 0.22 + 0.85rem);
}

.expert-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    flex: 0 0 auto;
}

.expert-card__identity {
    min-width: 0;
    flex: 1 1 auto;
}

.expert-card__name {
    margin: 0;
    color: var(--simp-ink);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.expert-card__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.1rem;
    margin-top: 0.3rem;
}

.expert-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #4a5a66;
    font-size: 0.92rem;
    line-height: 1.35;
}

.expert-card__meta-item .bi {
    color: var(--simp-green);
    font-size: 0.95rem;
}

.expert-card__meta-item--muted {
    color: #6b756f;
}

.expert-card__flags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
    flex: 0 1 auto;
    max-width: 100%;
}

.expert-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.expert-flag--diplomated,
.expert-flag--verified {
    background: #e5f4ea;
    color: #0d6b38;
}

.expert-flag--assistant {
    background: #f3ead8;
    color: #7a5410;
}

.expert-flag--insured {
    background: #dff3f8;
    color: #0b6a7c;
}

.expert-card__section-title {
    margin: 0 0 0.38rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--simp-green-dark);
}

.expert-card__body-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(200px, 0.85fr);
    gap: 0.6rem 1.35rem;
    align-items: start;
    min-height: 0;
    flex: 1 1 auto;
}

.expert-card__section--specialties,
.expert-card__section--contact {
    min-width: 0;
    min-height: 0;
}

.expert-card__section--contact {
    padding-left: 1.1rem;
    border-left: 1px solid var(--simp-border);
}

.expert-card--no-contact .expert-card__body-cols {
    grid-template-columns: minmax(0, 1fr);
}

.expert-specialty-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0.22rem;
}

.expert-specialty {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    max-width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    color: var(--simp-ink);
    font-size: 0.84rem;
    line-height: 1.28;
}

.expert-specialty__code {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    padding: 0.18rem 0.45rem;
    border-radius: 7px;
    background: #e7eee9;
    color: #0d6b38;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.expert-specialty__name {
    font-weight: 500;
    min-width: 0;
    padding-top: 0.12rem;
}

.expert-card__empty {
    color: #8a9690;
    font-size: 0.9rem;
}

.expert-contact-stack {
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
}

.expert-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.02rem 0;
    color: var(--simp-ink);
    text-decoration: none;
    font-size: 0.82rem;
    line-height: 1.22;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
    border: 0;
}

.expert-contact-item .bi {
    flex: 0 0 auto;
    margin-top: 0.12rem;
    color: var(--simp-green);
    font-size: 1rem;
}

.expert-contact-item:hover {
    color: var(--simp-green-dark);
    text-decoration: none;
    background: transparent;
}

.expert-contact-item:hover span {
    text-decoration: underline;
}

.expert-contact-item--static {
    color: #3d4d57;
}

.expert-contact-item--static:hover {
    background: transparent;
}

.expert-contact-item--static:hover span {
    text-decoration: none;
}

.expert-contact-item--address span {
    white-space: normal;
}

.location-map-page__back {
    color: var(--simp-green-dark);
    text-decoration: none;
    font-weight: 600;
}

.location-map-page__back:hover {
    text-decoration: underline;
}

.location-map-page__header {
    text-align: center;
}

.location-map-page__expert {
    margin: 0;
    color: var(--simp-ink);
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.25;
}

.location-map-page__org-title {
    margin: 0;
    color: var(--simp-ink);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.location-map-page__address {
    margin: 0;
    color: #3d4d57;
    font-size: 1rem;
}

.location-map-page__address .bi {
    color: var(--simp-green);
    margin-right: 0.25rem;
}

.location-map-page__map {
    height: min(70vh, 560px);
    min-height: 320px;
    border-radius: 12px;
    /* visible — żeby Leaflet popup nie był ucinany u góry kontenera */
    overflow: visible;
    border: 1px solid var(--simp-border);
    background: #e8eee9;
}

.location-map-page__map .leaflet-container {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    z-index: 0;
}

.location-map-page__map .leaflet-popup-pane {
    z-index: 700;
}

.location-map-page__map .leaflet-tile-pane,
.location-map-page__map .leaflet-overlay-pane,
.location-map-page__map .leaflet-shadow-pane,
.location-map-page__map .leaflet-marker-pane {
    border-radius: 12px;
}

.location-map-page__actions {
    padding: 1.1rem 1.2rem;
    border-radius: 12px;
    background: #eef5f0;
    border: 1px solid #cfe0d4;
    text-align: center;
}

.location-map-page__actions-title {
    margin: 0;
    color: var(--simp-ink);
    font-size: 0.95rem;
    font-weight: 700;
}

.location-map-page__actions-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}

.location-map-page__action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.05rem;
    border-radius: 10px;
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.location-map-page__action--google,
.location-map-page__action--apple,
.location-map-page__action--waze,
.location-map-page__action--geo {
    background: #fff;
    color: var(--simp-green-dark);
    border-color: #9fbfab;
}

.location-map-page__action--google:hover,
.location-map-page__action--apple:hover,
.location-map-page__action--waze:hover,
.location-map-page__action--geo:hover {
    background: var(--simp-green);
    color: #fff;
    border-color: var(--simp-green);
}

.location-map-popup {
    font-size: 0.9rem;
    line-height: 1.35;
    color: #102235;
    min-width: 12rem;
}

.location-map-popup__line {
    margin-top: 0.2rem;
    color: #3d4d57;
    font-weight: 400;
}

.location-map-popup__line:first-child {
    margin-top: 0;
}

.leaflet-container .location-map-popup-wrap .location-map-popup__expert,
.leaflet-container .location-map-popup-wrap .location-map-popup__expert strong {
    display: block;
    margin-bottom: 0.4rem;
    color: #102235 !important;
    font-size: 1.15em !important;
    font-weight: 700 !important;
    line-height: 1.3;
}

.leaflet-container .location-map-popup-wrap .location-map-popup__org {
    color: #102235 !important;
    font-size: 1em !important;
    font-weight: 600 !important;
}

.location-map-popup__link {
    color: var(--simp-green);
    font-weight: 700;
    text-decoration: none;
}

.location-map-popup__link:hover {
    color: var(--simp-green-dark);
    text-decoration: none;
}

/* Leaflet nadpisuje kolor `a` — wymuszamy zieleń SIMP w dymku */
.leaflet-container .location-map-popup-wrap a,
.leaflet-container .location-map-popup a,
.location-map-popup-wrap a.location-map-popup__link {
    color: var(--simp-green) !important;
    text-decoration: none !important;
}

.leaflet-container .location-map-popup-wrap a:hover,
.leaflet-container .location-map-popup a:hover,
.location-map-popup-wrap a.location-map-popup__link:hover {
    color: var(--simp-green-dark) !important;
    text-decoration: none !important;
}

.location-map-popup-wrap .leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(16, 34, 53, 0.16);
}

.location-map-popup-wrap .leaflet-popup-content {
    margin: 0.75rem 0.9rem;
}

/* Legacy contact bar (jeśli gdzieś jeszcze używany) */
.expert-card__contact {
    flex: 0 0 auto;
    margin-top: auto;
    border-top: 1px solid var(--simp-border);
    background: #fff;
}

.expert-contact-bar {
    display: grid;
    grid-template-columns: repeat(var(--contact-cols, 5), minmax(0, 1fr));
    align-items: stretch;
}

.expert-contact-item + .expert-contact-item {
    border-left: 0;
}

.expert-card__empty--contact {
    padding: 0.85rem 1.25rem;
}

/* Legacy compatibility */
.expert-card .card-title.expert-name {
    color: var(--simp-ink);
    font-weight: 700;
}

.masked-contact {
    color: inherit;
    font-family: monospace;
    cursor: pointer;
    transition: color 0.2s ease;
}

.masked-contact:hover {
    color: var(--simp-green);
    text-decoration: underline !important;
}

.toggle-contact {
    font-size: 0.875rem;
}

/* View mode buttons */
.btn-group .btn.active {
    background-color: var(--simp-green);
    border-color: var(--simp-green);
    color: white;
}

/* Table view */
#tableView table {
    font-size: 0.9rem;
}

#tableView thead {
    background-color: var(--simp-green-light);
}

#tableView tbody tr:hover {
    background-color: var(--simp-green-light);
}

/* Load more button */
#loadMoreBtn {
    min-width: 200px;
}

#loadMoreBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Filters */
.card {
    border-radius: 8px;
}

.form-select:focus,
.form-control:focus {
    border-color: var(--simp-green);
    box-shadow: 0 0 0 0.2rem rgba(27, 143, 58, 0.25);
}

/* Badges */
.badge {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Export modal */
#captchaQuestion {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

/* Admin panel */
.admin-stat-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-stat-grid .display-6 {
    font-size: clamp(1.35rem, 1.9vw, 2.25rem);
}
@media (min-width: 768px) {
    .admin-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (min-width: 992px) {
    .admin-stat-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

.admin-sidebar {
    background-color: #f8f9fa;
    min-height: calc(100vh - 56px);
    border-right: 1px solid #dee2e6;
}

.admin-sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: var(--simp-green-light);
    color: var(--simp-green);
}

/* Expert card responsive */
@media (max-width: 1100px) {
    :root {
        --expert-aside-w: 132px;
        --expert-avatar-w: 100px;
        --expert-avatar-h: 125px;
        --expert-number-h: 42px;
    }

    .expert-card__name {
        font-size: 1.22rem;
    }

    .expert-card__content {
        padding: 0.85rem 1.1rem 0.75rem 1.1rem;
    }

    .expert-card--has-photo .expert-card__content {
        padding-left: calc(var(--expert-avatar-w) * 0.22 + 0.7rem);
    }

    .expert-card__avatar {
        transform: translateX(20%);
        border-radius: 14px;
        top: calc(1rem + 15px);
    }

    .expert-flag {
        font-size: 0.72rem;
        padding: 0.35rem 0.65rem;
    }

    .expert-card__body-cols {
        grid-template-columns: minmax(0, 1fr) minmax(170px, 0.9fr);
        gap: 0.5rem 1rem;
    }

    .expert-card__section--contact {
        padding-left: 0.85rem;
    }
}

@media (max-width: 768px) {
    :root {
        --expert-aside-w: 100px;
        --expert-avatar-w: 78px;
        --expert-avatar-h: 98px;
        --expert-number-h: 42px;
    }

    .expert-card__layout {
        flex-direction: row;
        height: 100%;
        min-height: var(--expert-aside-h);
    }

    .expert-card__aside {
        flex: 0 0 var(--expert-aside-w);
        width: var(--expert-aside-w);
        min-width: var(--expert-aside-w);
        max-width: var(--expert-aside-w);
        min-height: var(--expert-aside-h);
        max-height: none;
        overflow: visible;
    }

    .expert-card__aside-art {
        top: 0;
        right: 0;
        left: 0;
        bottom: var(--expert-number-h);
        border-radius: 0;
        overflow: hidden;
    }

    .expert-card__aside-img {
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: left top;
        transform: none;
    }

    .expert-card__avatar {
        right: 0;
        left: auto;
        top: calc(0.85rem + 15px);
        bottom: auto;
        transform: translateX(18%);
        border-radius: 12px;
    }

    .expert-card__aside-number {
        justify-content: flex-start;
        padding: 0 0.45rem;
        font-size: 0.86rem;
        text-align: left;
    }

    .expert-card--has-photo .expert-card__aside-number {
        padding-right: calc(var(--expert-avatar-w) * 0.32 + 0.35rem);
    }

    .expert-card__content {
        padding: 0.85rem 0.85rem 0.7rem 0.85rem;
    }

    .expert-card--has-photo .expert-card__content {
        padding-left: calc(var(--expert-avatar-w) * 0.2 + 0.55rem);
    }

    .expert-card__head {
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
        margin-bottom: 0.45rem;
    }

    .expert-card__flags {
        justify-content: flex-start;
    }

    .expert-card__name {
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .expert-card__meta-row {
        gap: 0.25rem 0.75rem;
        margin-top: 0.3rem;
    }

    .expert-card__meta-item {
        font-size: 0.82rem;
    }

    .expert-card__section-title {
        margin-bottom: 0.3rem;
        font-size: 0.66rem;
    }

    .expert-specialty {
        font-size: 0.78rem;
    }

    .expert-card__body-cols {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .expert-card__section--contact {
        padding-left: 0;
        border-left: 0;
        padding-top: 0.55rem;
        border-top: 1px solid var(--simp-border);
    }

    .expert-contact-item {
        font-size: 0.78rem;
        padding: 0.01rem 0;
    }

    #tableView {
        font-size: 0.8rem;
    }

    .admin-sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
}

@media (max-width: 480px) {
    :root {
        --expert-aside-w: 84px;
        --expert-avatar-w: 64px;
        --expert-avatar-h: 80px;
        --expert-number-h: 42px;
    }

    .expert-card {
        border-radius: 12px;
        min-height: var(--expert-aside-h);
        height: auto;
    }

    .expert-card__layout {
        min-height: 0;
        height: 100%;
    }

    .expert-card__content {
        padding: 0.75rem 0.7rem 0.65rem 0.7rem;
    }

    .expert-card--has-photo .expert-card__content {
        padding-left: calc(var(--expert-avatar-w) * 0.18 + 0.45rem);
    }

    .expert-card__name {
        font-size: 0.98rem;
    }

    .expert-card__aside-number {
        font-size: 0.79rem;
        padding-left: 0.35rem;
    }

    .expert-card__avatar {
        border-radius: 11px;
        top: calc(0.75rem + 15px);
        transform: translateX(16%);
    }

    .expert-flag {
        font-size: 0.68rem;
        padding: 0.3rem 0.55rem;
    }
}

/* Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--simp-green);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

#catalogResults.loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.catalog-search__status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0 1rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--simp-green-dark);
}

.catalog-search__status[hidden] {
    display: none;
}

#filterForm.is-searching .catalog-search__submit,
#filterForm.is-searching .catalog-search__map-submit {
    pointer-events: none;
    opacity: 0.92;
}


.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Schema.org microdata - invisible but accessible */
[itemprop] {
    /* Microdata attributes don't affect styling */
}

/* Select2 customization for SIMP theme */
.select2-container--bootstrap-5 .select2-selection--single {
    min-height: 38px;
    display: flex;
    align-items: center;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: normal;
    padding: 0 12px;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: var(--simp-green);
}

.select2-container--bootstrap-5 .select2-results__option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 12px;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--simp-green) !important;
    color: white !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection,
.select2-container--bootstrap-5 .select2-selection:focus {
    border-color: var(--simp-green) !important;
    box-shadow: 0 0 0 0.25rem rgba(27, 143, 58, 0.25) !important;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field,
.select2-container--bootstrap-5 .select2-search__field {
    border-color: #ced4da;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus,
.select2-container--bootstrap-5 .select2-search__field:focus {
    border-color: var(--simp-green) !important;
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(27, 143, 58, 0.25) !important;
}

.select2-container--bootstrap-5 .select2-selection__clear:hover {
    color: var(--simp-green-dark);
}

.select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: var(--simp-green-light) !important;
    color: var(--simp-green-dark) !important;
}

/* CMS pages — heading scale under page h1 (2.5rem): ~20–25% between levels */
.page-body {
    --page-h2: 1.7rem;
    --page-h3: 1.35rem;
    --page-h4: 1.1rem;
}

.page-body p,
.page-body li {
    text-wrap: pretty;
}

.page-body ul,
.page-body ol {
    padding-left: 1.75rem;
    margin-bottom: 0.75em;
}

.page-body li > ul,
.page-body li > ol {
    margin: 0;
    padding-left: 1.75rem;
}

.page-body ol ul {
    list-style-type: disc;
}

.page-body ul ul {
    list-style-type: circle;
}

.page-body h2,
.page-body h3,
.page-body h4 {
    line-height: 1.3;
    margin-top: 1.35em;
    margin-bottom: 0.5em;
}

.page-body h2 {
    font-size: var(--page-h2);
    font-weight: 700;
}

.page-body h3 {
    font-size: var(--page-h3);
    font-weight: 600;
}

.page-body h4 {
    font-size: var(--page-h4);
    font-weight: 600;
}

.page-body a {
    color: var(--simp-green-dark);
    text-decoration: none;
    text-underline-offset: 0.15em;
    word-break: break-word;
}

.page-body a:hover {
    color: var(--simp-green);
    text-decoration: underline;
}

/* Admin — plain text links use SIMP green (not Bootstrap blue) */
main.container a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand):not(.page-link):not(.alert-link):not(.stretched-link) {
    color: var(--simp-green);
}

main.container a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand):not(.page-link):not(.alert-link):not(.stretched-link):hover {
    color: var(--simp-green-dark);
}

/* Admin instructions — green tabs / accordion (not Bootstrap blue) */
.admin-instructions__role {
    background-color: var(--simp-green-light);
    color: var(--simp-green-dark);
    border: 1px solid rgba(27, 143, 58, 0.35);
    font-weight: 500;
}

.admin-instructions__tabs {
    border-bottom-color: rgba(27, 143, 58, 0.25);
}

.admin-instructions__tabs .nav-link {
    color: var(--simp-green-dark);
    border-color: transparent;
}

.admin-instructions__tabs .nav-link:hover,
.admin-instructions__tabs .nav-link:focus {
    color: var(--simp-green);
    border-color: rgba(27, 143, 58, 0.2) rgba(27, 143, 58, 0.2) rgba(27, 143, 58, 0.25);
    isolation: isolate;
}

.admin-instructions__tabs .nav-link.active {
    color: var(--simp-green-dark);
    background-color: #fff;
    border-color: rgba(27, 143, 58, 0.35) rgba(27, 143, 58, 0.35) #fff;
    font-weight: 600;
}

/* Admin settings — wyraźne aktywne / nieaktywne zakładki (nie Bootstrap blue) */
.admin-settings__tabs {
    border-bottom: 2px solid rgba(27, 143, 58, 0.22);
    gap: 0.2rem;
    flex-wrap: wrap;
    overflow: visible;
}

.admin-settings__tabs .nav-item {
    margin-bottom: -2px;
}

.admin-settings__tabs .nav-link {
    color: var(--simp-muted);
    background-color: #eef2ef;
    border: 1px solid var(--simp-border);
    border-bottom-color: transparent;
    border-radius: 0.375rem 0.375rem 0 0;
    padding: 0.55rem 1rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.admin-settings__tabs .nav-link:hover,
.admin-settings__tabs .nav-link:focus {
    color: var(--simp-green-dark);
    background-color: var(--simp-green-light);
    border-color: rgba(27, 143, 58, 0.28);
    border-bottom-color: transparent;
}

.admin-settings__tabs .nav-link.active {
    color: #fff;
    background-color: var(--simp-green);
    border-color: var(--simp-green) var(--simp-green) #fff;
    font-weight: 600;
}

.admin-instructions .accordion-button:not(.collapsed) {
    color: var(--simp-green-dark);
    background-color: var(--simp-green-light);
    box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 rgba(27, 143, 58, 0.2);
}

.admin-instructions .accordion-button:focus {
    border-color: rgba(27, 143, 58, 0.45);
    box-shadow: 0 0 0 0.25rem rgba(27, 143, 58, 0.25);
}

.admin-instructions .accordion-button::after {
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23156e2d'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.admin-instructions .accordion-item {
    border-color: rgba(27, 143, 58, 0.2);
}

.admin-instructions code {
    color: var(--simp-green-dark);
    background-color: var(--simp-green-light);
}

/* Baza — public statistics */
.baza-page {
    max-width: 960px;
    margin: 0 auto;
}

.baza-hero {
    margin-bottom: 1.5rem;
    animation: baza-fade-up 0.55s ease both;
}

.baza-hero__eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--simp-green);
}

.baza-hero__title {
    margin: 0 0 0.65rem;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.85rem, 4vw, 2.45rem);
    font-weight: 700;
    color: var(--simp-ink);
    line-height: 1.15;
}

.baza-hero__lead {
    margin: 0;
    color: var(--simp-muted);
    font-size: 1.05rem;
    line-height: 1.55;
    text-wrap: balance;
}

.baza-highlight {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem 1.25rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1.35rem 1.5rem;
    border-radius: 16px;
    color: #fff;
    background:
        radial-gradient(circle at 92% 18%, rgba(255, 255, 255, 0.16), transparent 42%),
        linear-gradient(135deg, #0a5c2e 0%, #1b8f3a 55%, #156e2d 100%);
    box-shadow: 0 14px 34px rgba(10, 92, 46, 0.22);
    animation: baza-fade-up 0.65s ease 0.08s both;
}

.baza-highlight__icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 1.55rem;
}

.baza-highlight__value {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.baza-highlight__label {
    margin-top: 0.35rem;
    font-size: 0.98rem;
    opacity: 0.92;
}

.baza-highlight__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    background: #fff !important;
    border-color: #fff !important;
    color: var(--simp-header-green) !important;
    font-weight: 700;
    padding: 0.7rem 1.15rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.baza-highlight__cta:hover {
    background: var(--simp-green-light) !important;
    border-color: var(--simp-green-light) !important;
    color: var(--simp-green-dark) !important;
}

.baza-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .baza-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.15rem;
    }
}

.baza-card {
    background: #fff;
    border: 1px solid rgba(27, 143, 58, 0.14);
    border-radius: 14px;
    padding: 1.25rem 1.2rem 1.15rem;
    box-shadow: 0 8px 22px rgba(26, 31, 28, 0.04);
    animation: baza-fade-up 0.7s ease both;
}

.baza-card:nth-child(1) { animation-delay: 0.16s; }
.baza-card:nth-child(2) { animation-delay: 0.24s; }
.baza-card:nth-child(3) { animation-delay: 0.32s; }

.baza-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    min-height: 2.75rem;
}

.baza-card__icon {
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--simp-green-light);
    color: var(--simp-green);
    font-size: 1.35rem;
}

.baza-card__value {
    flex: 1 1 auto;
    margin: 0;
    text-align: right;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.9rem, 3.5vw, 2.35rem);
    font-weight: 700;
    color: var(--simp-ink);
    line-height: 1;
    letter-spacing: -0.02em;
}

.baza-card__label {
    margin-top: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--simp-ink);
}

.baza-card__hint {
    margin: 0.45rem 0 0;
    font-size: 0.86rem;
    line-height: 1.4;
    color: var(--simp-muted);
}

.baza-card__pct {
    display: inline;
    font-size: 0.8rem;
    font-weight: 500;
    color: #8a938d;
}

@keyframes baza-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767.98px) {
    .baza-highlight {
        grid-template-columns: auto 1fr;
    }

    .baza-highlight__cta {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .baza-hero,
    .baza-highlight,
    .baza-card {
        animation: none;
    }
}

/* Footer */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--simp-border);
    padding: 0.89rem 0 0.81rem;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--simp-ink);
    text-align: center;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.site-footer__contact {
    margin: 0;
    padding: 0 0 0.6rem;
    font-style: normal;
    color: var(--simp-muted);
}

.site-footer__org {
    display: block;
    margin: 0 0 0.24rem;
    font-weight: 700;
    color: var(--simp-ink);
}

.site-footer__ico {
    margin-right: 0.12em;
    color: var(--simp-green);
    font-style: normal;
}

.site-footer__nowrap {
    white-space: nowrap;
}

.site-footer__dot {
    margin: 0 0.4rem;
    opacity: 0.55;
}

.site-footer__contact a,
.site-footer__links a {
    color: var(--simp-green-dark);
    text-decoration: none;
    font-weight: 500;
}

.site-footer__contact a:hover,
.site-footer__links a:hover {
    color: var(--simp-green);
    text-decoration: underline;
}

.site-footer__links {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0.51rem 0 0.2rem;
    border-top: 1px solid var(--simp-border);
}

.site-footer__legal {
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-footer__sep {
    margin: 0 0.7rem;
    color: var(--simp-muted);
    opacity: 0.7;
    white-space: nowrap;
}

.site-footer__copy {
    margin: 0;
    padding-top: 0.2rem;
    width: 100%;
    color: var(--simp-muted);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.35;
    white-space: nowrap;
    text-align: center;
}

/* Catalog search — compact filters + map icon */
.catalog-hero__title {
    margin: 0 0 1rem;
    font-weight: 400;
    line-height: 1.2;
}

.catalog-search {
    margin-bottom: 1.5rem;
}

.catalog-search__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0;
    padding: 0.85rem 0.85rem 0.85rem 1rem;
}

.catalog-search__fields {
    min-width: 0;
    padding-right: 0.75rem;
}

.catalog-search__heading {
    margin: 0 0 0.7rem;
    font-size: 1rem;
}

.catalog-search__org {
    margin: 0;
    padding: 0 1rem;
    border-top: 0;
}

.catalog-search__org.show,
.catalog-search__org.collapsing {
    border-top: 1px solid var(--simp-border);
    padding-top: 0.75rem;
    padding-bottom: 0.95rem;
}

.catalog-search__org-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--simp-muted);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.catalog-search__org-toggle:hover,
.catalog-search__org-toggle:focus {
    color: var(--simp-green);
}

.catalog-search__org-toggle .bi {
    display: inline-block;
    font-size: 0.7rem;
    margin-left: 0.15rem;
    transition: transform 0.15s ease;
}

.catalog-search__org-toggle[aria-expanded="true"] .bi {
    transform: rotate(180deg);
}

.catalog-search__fields .form-label {
    font-size: 0.82rem;
    margin-bottom: 0;
}

.catalog-search__field {
    display: flex;
    flex-direction: column;
}

.catalog-search__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    height: 1.85rem;
    margin-bottom: 0.25rem;
    flex-wrap: nowrap;
}

.catalog-search__label-row .form-label {
    margin-bottom: 0;
    line-height: 1.2;
    min-width: 0;
}

.catalog-search__mode {
    flex: 0 0 auto;
}

.catalog-search__mode .btn {
    padding: 0.08rem 0.42rem;
    font-size: 0.7rem;
    line-height: 1.15;
}

.catalog-search__control {
    min-height: 31px;
}

.catalog-search__fields .form-control-sm,
.catalog-search__fields .form-select-sm {
    min-height: 31px;
}

.catalog-search__fields .select2-container {
    width: 100% !important;
}

.catalog-search__fields .select2-container .select2-selection--single {
    min-height: 31px;
    height: 31px;
}

.catalog-search__actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0.15rem 1rem 0.95rem;
}

.catalog-search__submit {
    min-width: 8.5rem;
    padding: 0.45rem 1.35rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.catalog-search__reset {
    min-width: 5.5rem;
}

.catalog-results__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.catalog-results__sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalog-results__sort .form-label {
    font-size: 0.82rem;
    color: var(--simp-muted);
    white-space: nowrap;
}

.catalog-results__sort .form-select {
    width: auto;
    min-width: 12.5rem;
}

.catalog-search__map-cta {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    align-self: stretch;
    margin: -0.85rem -0.85rem 0 0;
    padding: 0.5rem 0.65rem 0.5rem;
    background: #fff;
}

.catalog-search__map-label {
    flex: 0 0 auto;
    margin: 0.5rem 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--simp-green);
    text-align: center;
}

.catalog-search__map {
    margin-bottom: 1.5rem;
}

.catalog-search__map-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    align-items: flex-start;
}

.catalog-search__map-canvas {
    flex: 1 1 0;
    min-width: 0;
}

.catalog-search__leaflet {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--simp-border, #dde3ea);
}

.catalog-search__map-nav {
    flex: 0 0 12.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: #f7f9f8;
    border: 1px solid var(--simp-border, #dde3ea);
    border-radius: 8px;
    align-self: flex-start;
}

.catalog-search__map-nav-label {
    margin-bottom: 0;
    font-size: 0.92rem;
    line-height: 1.35;
}

.catalog-search__map-radius-row {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    height: 12.8rem;
}

.catalog-search__map-radius {
    writing-mode: vertical-lr;
    direction: ltr;
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 100%;
    margin: 0;
    padding: 0;
    flex: 0 0 1rem;
    background-color: transparent;
    background-image: linear-gradient(#d9e2dc, #d9e2dc);
    background-size: 4px 100%;
    background-position: center;
    background-repeat: no-repeat;
    accent-color: var(--simp-green);
    cursor: pointer;
}

.catalog-search__map-radius::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 100%;
    background: transparent;
    border: 0;
}

.catalog-search__map-radius::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    margin: 0 !important;
    background: var(--simp-green);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.catalog-search__map-radius::-moz-range-track {
    width: 4px;
    height: 100%;
    background: #d9e2dc;
    border: 0;
    border-radius: 999px;
}

.catalog-search__map-radius::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    margin: 0;
    background: var(--simp-green);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.catalog-search__map-radius-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 auto;
    gap: 0;
    margin: 0;
}

.catalog-search__map-radius-opt {
    display: block;
    width: 100%;
    padding: 0.22rem 0.4rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #5c6770;
    font-size: 0.82rem;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

.catalog-search__map-radius-opt:hover {
    background: rgba(7, 136, 63, 0.08);
    color: #1a1a1a;
}

.catalog-search__map-radius-opt.is-active {
    background: rgba(7, 136, 63, 0.14);
    color: #07883f;
    font-weight: 600;
}

.catalog-search__map-clear {
    align-self: stretch;
}

.catalog-search__map-submit {
    align-self: stretch;
}

@media (max-width: 767.98px) {
    .catalog-search__map-canvas {
        flex-basis: 100%;
    }

    .catalog-search__map-nav {
        flex: 1 1 100%;
    }

    .catalog-search__leaflet {
        height: 360px;
    }

    .catalog-search__map-radius-row {
        height: 11.6rem;
    }
}

.mapa-szukaj {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    width: auto;
    aspect-ratio: 1 / 1;
    max-width: min(38vw, 22rem);
    max-height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}

button.mapa-szukaj {
    cursor: pointer;
}

button.mapa-szukaj:focus-visible {
    outline: 2px solid var(--simp-green);
    outline-offset: 3px;
}

button.mapa-szukaj[aria-expanded="true"],
button.mapa-szukaj.is-open {
    filter: drop-shadow(0 0 0.35rem rgba(6, 87, 41, 0.35));
}

.mapa-szukaj__bg,
.mapa-szukaj__outline,
.mapa-szukaj__loupe,
.mapa-szukaj__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.mapa-szukaj picture.mapa-szukaj__bg,
.mapa-szukaj picture.mapa-szukaj__loupe,
.mapa-szukaj picture.mapa-szukaj__img {
    display: block;
}

.mapa-szukaj picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mapa-szukaj__outline {
    z-index: 1;
    overflow: visible;
}

.mapa-szukaj__loupe {
    z-index: 2;
}

.mapa-szukaj__img {
    z-index: 3;
    transition: opacity 0.12s linear;
}

.mapa-szukaj__path {
    fill: none;
    stroke: #065729;
    stroke-width: 14;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.mapa-szukaj__path--hel {
    stroke-linecap: butt;
}

.mapa-szukaj__path--lens {
    stroke-width: 7;
}

.mapa-szukaj__shine {
    position: absolute;
    inset: 9%;
    border-radius: 22%;
    pointer-events: none;
    z-index: 4;
    background: linear-gradient(
        115deg,
        transparent 32%,
        rgba(255, 255, 255, 0.55) 48%,
        transparent 64%
    );
    background-size: 220% 100%;
    background-position: 120% 0;
    mix-blend-mode: soft-light;
    animation: mapa-szukaj-shine 6s ease-in-out 1.2s infinite;
}

.mapa-szukaj__ring {
    position: absolute;
    left: 59%;
    top: 61.5%;
    width: 23%;
    height: 23%;
    margin: -11.5% 0 0 -11.5%;
    border: 2px solid rgba(6, 87, 41, 0.42);
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    animation: mapa-szukaj-ping 2.8s ease-out 0.6s infinite both;
}

.mapa-szukaj__ring--late {
    animation-delay: 2s;
}

.mapa-szukaj:hover .mapa-szukaj__img,
.mapa-szukaj:focus-visible .mapa-szukaj__img {
    opacity: 0;
}

.mapa-szukaj:hover .mapa-szukaj__ring,
.mapa-szukaj:focus-visible .mapa-szukaj__ring,
.mapa-szukaj:hover .mapa-szukaj__shine,
.mapa-szukaj:focus-visible .mapa-szukaj__shine {
    animation: none;
    opacity: 0;
}

.mapa-szukaj:hover .mapa-szukaj__path,
.mapa-szukaj:focus-visible .mapa-szukaj__path {
    animation: mapa-szukaj-redraw 1.85s ease 0.08s forwards;
}

@keyframes mapa-szukaj-shine {
    0%, 62%, 100% { background-position: 120% 0; opacity: 0; }
    70% { opacity: 1; }
    78% { background-position: -20% 0; opacity: 0; }
}

@keyframes mapa-szukaj-ping {
    0% { transform: scale(0.72); opacity: 0; }
    8% { opacity: 0.55; }
    70% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

@keyframes mapa-szukaj-redraw {
    from { stroke-dashoffset: 100; }
    to { stroke-dashoffset: 0; }
}

@media (max-width: 767.98px) {
    .catalog-search__body {
        grid-template-columns: 1fr;
        padding: 0.85rem 1rem;
    }

    .catalog-search__fields {
        padding-right: 0;
    }

    .catalog-search__map-cta {
        margin: 0.65rem 0 0;
        padding: 0.5rem 0 0;
        border-top: 1px solid var(--simp-border);
    }

    .mapa-szukaj {
        width: 160px;
        height: 160px;
        max-width: 160px;
    }

    .mapa-szukaj__shine,
    .mapa-szukaj__ring {
        display: none;
    }

    .mapa-szukaj:hover .mapa-szukaj__img,
    .mapa-szukaj:focus-visible .mapa-szukaj__img {
        opacity: 1;
    }

    .catalog-search__org-toggle {
        position: static;
        transform: none;
        width: 100%;
        text-align: center;
        margin-top: 0.15rem;
    }

    .catalog-search__actions {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mapa-szukaj__shine,
    .mapa-szukaj__ring {
        animation: none;
        display: none;
    }

    .mapa-szukaj:hover .mapa-szukaj__img,
    .mapa-szukaj:focus-visible .mapa-szukaj__img {
        opacity: 1;
    }

    .mapa-szukaj:hover .mapa-szukaj__path,
    .mapa-szukaj:focus-visible .mapa-szukaj__path {
        animation: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .filters,
    .btn,
    footer {
        display: none !important;
    }
    
    .expert-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

.password-rules {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
    row-gap: .25rem;
}
.password-rules li {
    color: var(--bs-secondary-color, #6c757d);
}
.password-rules li [data-rule-mark] {
    display: inline-block;
    width: 1.1em;
    font-weight: 700;
}
.password-rules li.is-met {
    color: var(--simp-green, #198754);
}
.password-rules li.is-met [data-rule-mark] {
    color: var(--simp-green, #198754);
}


