/**
 * Poliklinik directory — /services/poliklinik
 * Shared hero / buttons / pills / empty state come from page.css, which must be
 * loaded before this file. Design tokens come from site.css (:root).
 */

/* ==========================================================================
   1. Toolbar — search + filter chips
   ========================================================================== */
.sv-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: clamp(16px, 2vw, 22px);
    margin-bottom: clamp(24px, 3vw, 36px);
    background: #fff;
    border: 1px solid var(--ln-line);
    border-radius: var(--ln-r-lg);
    box-shadow: var(--ln-sh-sm);
}

.sv-search {
    position: relative;
    flex: 1 1 300px;
    min-width: 0;
}

.sv-search > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ln-muted);
    font-size: 15px;
    pointer-events: none;
}

.sv-search input {
    width: 100%;
    height: 48px;
    padding: 0 44px;
    border: 1.5px solid var(--ln-line);
    border-radius: 999px;
    background: var(--ln-sky);
    font-size: 14px;
    font-family: inherit;
    color: var(--ln-navy);
    outline: none;
    transition: border-color .2s var(--ln-ease), background .2s var(--ln-ease),
        box-shadow .2s var(--ln-ease);
    -webkit-appearance: none;
    appearance: none;
}

.sv-search input::placeholder {
    color: #9aa9c2;
}

.sv-search input:focus {
    border-color: var(--ln-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 109, 255, .12);
}

/* Native clear button is inconsistent across browsers, so we ship our own. */
.sv-search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.sv-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    place-items: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--ln-sky-2);
    color: var(--ln-muted);
    font-size: 13px;
    cursor: pointer;
    transition: background .2s var(--ln-ease), color .2s var(--ln-ease);
}

.sv-search-clear:hover {
    background: var(--ln-blue-tint);
    color: var(--ln-blue-dark);
}

.sv-search.is-filled .sv-search-clear {
    display: grid;
}

.sv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sv-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: 1px solid var(--ln-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ln-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all .25s var(--ln-ease);
}

.sv-chip i {
    font-size: 13px;
    color: var(--ln-blue);
    transition: color .25s var(--ln-ease);
}

.sv-chip:hover {
    border-color: rgba(26, 109, 255, .35);
    color: var(--ln-blue-dark);
}

.sv-chip[aria-pressed="true"] {
    background: var(--ln-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 24px rgba(26, 109, 255, .3);
}

.sv-chip[aria-pressed="true"] i {
    color: #fff;
}

.sv-count {
    font-size: 13px;
    color: var(--ln-muted);
    margin: 0 0 18px;
}

.sv-count b {
    color: var(--ln-navy);
    font-weight: 800;
}

/* ==========================================================================
   2. Poliklinik grid
   ========================================================================== */
.sv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.8vw, 22px);
}

.sv-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: clamp(18px, 2vw, 24px);
    background: #fff;
    border: 1px solid var(--ln-line);
    border-radius: var(--ln-r-lg);
    box-shadow: var(--ln-sh-xs);
    text-decoration: none;
    overflow: hidden;
    transition: transform .3s var(--ln-ease), box-shadow .3s var(--ln-ease),
        border-color .3s var(--ln-ease);
}

.sv-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, var(--ln-sky-2) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .3s var(--ln-ease);
}

.sv-card > * {
    position: relative;
    z-index: 1;
}

.sv-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ln-sh);
    border-color: rgba(26, 109, 255, .28);
}

.sv-card:hover::before {
    opacity: 1;
}

.sv-card:focus-visible {
    outline: 3px solid rgba(26, 109, 255, .45);
    outline-offset: 2px;
}

.sv-card-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin-bottom: 16px;
    border-radius: 20px;
    background: var(--ln-blue-tint);
    border: 1px solid transparent;
    transition: transform .3s var(--ln-ease), background .3s var(--ln-ease),
        border-color .3s var(--ln-ease);
}

.sv-card:hover .sv-card-icon {
    transform: scale(1.06);
    background: #fff;
    border-color: rgba(26, 109, 255, .3);
}

.sv-card-icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.sv-card-icon i {
    font-size: 26px;
    color: var(--ln-blue);
}

.sv-card-name {
    font-size: clamp(14px, 1.45vw, 15.5px);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.01em;
    color: var(--ln-navy);
    margin: 0 0 10px;
    transition: color .25s var(--ln-ease);
}

.sv-card:hover .sv-card-name {
    color: var(--ln-blue-dark);
}

.sv-card-doctors {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 11px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--ln-sky-2);
    color: var(--ln-blue-dark);
    font-size: 11px;
    font-weight: 700;
}

.sv-card-doctors i {
    font-size: 11px;
}

.sv-card-doctors--empty {
    background: #f1f5f9;
    color: #64748b;
}

.sv-card-desc {
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--ln-muted);
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sv-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--ln-line);
}

.sv-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ln-blue-dark);
    transition: gap .25s var(--ln-ease);
}

.sv-card:hover .sv-card-cta {
    gap: 12px;
}

.sv-card-arrow {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ln-sky-2);
    color: var(--ln-blue-dark);
    font-size: 12px;
    flex: 0 0 30px;
    transition: background .3s var(--ln-ease), color .3s var(--ln-ease),
        transform .3s var(--ln-ease);
}

.sv-card:hover .sv-card-arrow {
    background: var(--ln-grad);
    color: #fff;
    transform: translateX(3px);
}

.sv-card-star {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff7e6;
    border: 1px solid #fde3bd;
    color: #b45309;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.sv-card-star i {
    font-size: 10px;
    color: var(--ln-amber);
}

/* Hidden by the client-side filter. */
.sv-card-cell[hidden] {
    display: none;
}

/* ==========================================================================
   3. Closing CTA
   ========================================================================== */
.sv-cta {
    position: relative;
    margin-top: clamp(36px, 4.5vw, 60px);
    padding: clamp(26px, 3.2vw, 42px);
    border-radius: var(--ln-r-xl);
    background: var(--ln-grad);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 24px 56px rgba(10, 36, 100, .26);
}

.sv-cta::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -80px;
    top: -120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.sv-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sv-cta h2 {
    font-size: clamp(18px, 2.3vw, 26px);
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fff;
    margin: 0 0 8px;
}

.sv-cta p {
    font-size: clamp(13px, 1.4vw, 15px);
    line-height: 1.7;
    color: rgba(255, 255, 255, .8);
    margin: 0;
    max-width: 56ch;
}

.sv-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==========================================================================
   4. Responsive
   ========================================================================== */
@media (max-width: 1199.98px) {
    .sv-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .sv-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .sv-chips {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .sv-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sv-cta-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .sv-cta-actions .pr-btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 575.98px) {
    .sv-card {
        padding: 16px;
    }

    .sv-card-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        margin-bottom: 12px;
    }

    .sv-card-icon img {
        width: 28px;
        height: 28px;
    }

    .sv-card-desc {
        -webkit-line-clamp: 2;
        font-size: 12px;
    }

    .sv-card-star {
        top: 10px;
        right: 10px;
        padding: 3px 8px;
        font-size: 9px;
    }

    .sv-cta-actions {
        flex-direction: column;
    }

    .sv-cta-actions .pr-btn {
        width: 100%;
    }
}

@media (max-width: 399.98px) {
    .sv-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
