/* ─── Avrupa Bayi Yönetimi — Listing Page Styles ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

#avrupa-bayi-container {
    max-width: 1280px;
    margin: 48px auto;
    padding: 0 20px;
    font-family: 'Inter', -apple-system, sans-serif;
    color: #1c2340;
}

/* ── Header ─────────────────────────────────────── */
.avrupa-bayi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.avrupa-bayi-header h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: #1c2340;
    margin: 0;
    letter-spacing: -.5px;
}

.avrupa-bayi-header h1 span {
    color: #c62626;
}

/* ── İl Filter ──────────────────────────────────── */
#bayi-il-filter {
    appearance: none;
    padding: 10px 42px 10px 16px;
    border-radius: 10px;
    border: 1.5px solid #e0e4ee;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center;
    font-size: .9rem;
    font-weight: 500;
    min-width: 200px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    color: #1c2340;
}

#bayi-il-filter:focus {
    border-color: #c62626;
    box-shadow: 0 0 0 3px rgba(198, 38, 38, .12);
    outline: none;
}

.bayi-list-wrapper .bayi-filter {
    margin-bottom: 20px;
}

.bayi-list-wrapper #bayi-il-filter {
    width: 100%;
}

/* ── Layout ─────────────────────────────────────── */
.avrupa-bayi-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(28, 35, 64, .10);
    border: 1px solid #eaecf4;
    min-height: 600px;
}

/* ── List Sidebar ───────────────────────────────── */
.bayi-list-wrapper {
    height: 620px;
    overflow-y: auto;
    padding: 16px;
    background: #f7f8fc;
    border-right: 1px solid #eaecf4;
}

/* ── Bayi Card — Horizontal ─────────────────────── */
.bayi-item {
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    transition: box-shadow .25s ease, border-color .25s ease, transform .2s ease;
}

.bayi-item:hover {
    box-shadow: 0 6px 24px rgba(198, 38, 38, .12);
    border-color: #c62626;
    transform: translateX(3px);
}

.bayi-item.active {
    border-color: #c62626;
    background: #fff9f9;
    box-shadow: 0 4px 16px rgba(198, 38, 38, .15);
}

/* ── Thumbnail ──────────────────────────────────── */
.bayi-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.bayi-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Info ───────────────────────────────────────── */
.bayi-info {
    flex: 1;
    min-width: 0;
}

.bayi-info h3 {
    margin: 0 0 4px 0;
    font-size: .9rem;
    font-weight: 700;
    color: #1c2340;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bayi-info p {
    margin: 2px 0;
    font-size: .78rem;
    color: #6b7280;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.4;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bayi-info .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
    color: #c62626;
    flex-shrink: 0;
    margin-top: 1px;
}

.bayi-detail-link {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    color: #c62626;
    text-decoration: none;
    font-weight: 600;
    font-size: .75rem;
    transition: opacity .2s;
    gap: 3px;
}

.bayi-detail-link::after {
    content: '→';
    transition: transform .2s;
}

.bayi-detail-link:hover {
    opacity: .75;
}

.bayi-item:hover .bayi-detail-link::after {
    transform: translateX(3px);
}

/* ── Map Wrapper ─────────────────────────────────── */
.bayi-map-wrapper {
    position: relative;
    background: #e8ecf5;
}

#bayi-map {
    width: 100%;
    height: 100%;
    min-height: 620px;
}

/* ── Scrollbar ───────────────────────────────────── */
.bayi-list-wrapper::-webkit-scrollbar {
    width: 5px;
}

.bayi-list-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.bayi-list-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5e0;
    border-radius: 10px;
}

.bayi-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: #b0b6c8;
}

/* ── Responsive ──────────────────────────────────── */

/* Tablet & Mobile (≤ 992px) */
@media (max-width: 992px) {
    #avrupa-bayi-container {
        margin: 24px auto;
    }

    .avrupa-bayi-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    #bayi-il-filter {
        width: 100%;
        min-width: unset;
    }

    /* Kill the sidebar+map grid, go full-width */
    .avrupa-bayi-layout {
        display: block;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        border: none;
        min-height: unset;
    }

    /* Hide map entirely on mobile */
    .bayi-map-wrapper {
        display: none !important;
    }

    /* List: no fixed height, flows naturally */
    .bayi-list-wrapper {
        height: auto;
        max-height: none;
        overflow: visible;
        padding: 0;
        background: transparent;
        border: none;
    }

    /* Cards in a 2-column grid */
    #bayi-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    /* Each card: vertical layout */
    .bayi-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 0;
        border-radius: 14px;
        overflow: hidden;
        border: 1.5px solid #eaecf4;
        background: #fff;
        box-shadow: 0 2px 12px rgba(28, 35, 64, .06);
        transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    }

    .bayi-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(198, 38, 38, .13);
        border-color: #c62626;
    }

    /* Thumbnail full-width */
    .bayi-thumb {
        width: 100%;
        height: 110px;
        border-radius: 0;
        margin: 0;
        flex-shrink: 0;
    }

    /* Info below thumbnail */
    .bayi-info {
        padding: 10px 12px 12px;
        width: 100%;
    }

    .bayi-info h3 {
        font-size: .85rem;
        margin-bottom: 4px;
    }

    .bayi-info p {
        font-size: .75rem;
    }

    .bayi-detail-link {
        margin-top: 8px;
        font-size: .78rem;
    }
}

/* Small mobile (≤ 560px): single column */
@media (max-width: 560px) {
    #bayi-list {
        grid-template-columns: 1fr;
    }

    .bayi-thumb {
        height: 160px;
    }

    .avrupa-bayi-header h1 {
        font-size: 1.5rem;
    }
}