/* ── Anlaşmalı Kurumlar – Frontend CSS ───────────────────── */

#ak-wrapper {
    font-family: inherit;
}

/* ── Filtre Çubuğu (YAN YANA) ────────────────────────────── */
.ak-filter-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 28px;
}

.ak-select,
.ak-search {
    height: 42px;
    border: 1px solid #ccd0d4;
    border-radius: 6px;
    padding: 0 14px;
    font-size: .95rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.ak-select {
    min-width: 200px;
    max-width: 280px;
    flex: 0 1 auto;
}

.ak-search {
    min-width: 180px;
    flex: 1 1 200px;
}

.ak-select:focus,
.ak-search:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, .15);
}

.ak-btn-reset {
    height: 42px;
    padding: 0 18px;
    border: 1px solid #b32d2e;
    border-radius: 6px;
    background: #fff;
    color: #b32d2e;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s, color .2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.ak-btn-reset:hover {
    background: #b32d2e;
    color: #fff;
}

/* ── Loading ──────────────────────────────────────────────── */
.ak-results.ak-loading {
    opacity: .45;
    pointer-events: none;
    transition: opacity .2s;
}

/* ── Tür Grubu ────────────────────────────────────────────── */
.ak-tur-group {
    margin-bottom: 36px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}

.ak-tur-title {
    margin: 0;
    padding: 14px 20px !important;
    font-size: 1.05rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1a3c5e 0%, #2271b1 100%);
    color: #fff;
    letter-spacing: .3px;
    /* Başlık CSS düzeltmesi — text-transform kaldırıldı, doğru font size */
    text-transform: none;
    line-height: 1.4;
}

/* ── Hastane alt grubu (details) ──────────────────────────── */
.ak-hastane-group {
    border-bottom: 1px solid #eee;
}

.ak-hastane-group:last-child {
    border-bottom: none;
}

.ak-hastane-title {
    padding: 12px 20px;
    font-weight: 600;
    font-size: .95rem;
    background: #f0f4f8;
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .15s;
    /* Başlık CSS düzeltmesi */
    margin: 0;
    line-height: 1.4;
}

.ak-hastane-title:hover {
    background: #e1eaf4;
}

.ak-hastane-title::before {
    content: '▶';
    font-size: .7rem;
    transition: transform .2s;
}

details[open]>.ak-hastane-title::before {
    transform: rotate(90deg);
}

/* Webkit — summary ok işaretini kaldır */
.ak-hastane-title::-webkit-details-marker {
    display: none;
}

/* ── Kurum Listesi ────────────────────────────────────────── */
.ak-kurum-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 3;
    column-gap: 0;
    background: #fff;
}

.ak-kurum-list li {
    padding: 8px 20px;
    border-bottom: 1px solid #f2f2f2;
    font-size: .9rem;
    color: #333;
    break-inside: avoid;
    transition: background .15s;
}

.ak-kurum-list li:hover {
    background: #f7fbff;
}

/* ── Sonuç Yok ─────────────────────────────────────────────── */
.ak-no-result {
    text-align: center;
    padding: 40px;
    color: #777;
    font-size: 1rem;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 8px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media(max-width: 768px) {
    .ak-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ak-select,
    .ak-search {
        min-width: 100%;
        max-width: 100%;
    }

    .ak-search {
        flex: none;
    }

    .ak-kurum-list {
        columns: 1;
    }
}

@media(min-width: 769px) and (max-width:1100px) {
    .ak-kurum-list {
        columns: 2;
    }
}