/* =========================================
   1. STYLIZACJA FILTRÓW (GÓRA)
   ========================================= */

/* --- style.css --- */

/* 1. KONTENER FILTRÓW (Bez zmian) */
#lekarz-filter-wrapper {
    max-width: 1100px;
    margin: 0 auto 40px auto;
    padding: 0 10px;
}

#lekarz-filter-form {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.filter-group label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #4A5568;
    text-transform: uppercase;
}

#lekarz-filter-form input[type="text"],
#lekarz-filter-form select {
    height: 45px;
    min-width: 200px;
    padding: 0 15px;
    border: 1px solid #cbd5e0;
    border-radius: 5px;
    font-size: 15px;
    background-color: #fff;
}

#lekarz-filter-form button {
    height: 45px;
    padding: 0 30px;
    background-color: #3182CE;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lekarz-filter-form button:hover {
    background-color: #2c5282;
}

/* 2. GRID WYNIKÓW */
.viamed-lekarze-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
    max-width: 1100px; 
    margin: 30px auto; 
    width: 100%;
    padding: 0 10px;
}

/* KARTA LEKARZA */
.viamed-card {
    display: flex;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.viamed-card:hover {
    transform: translateY(-4px);
}


/* LEWA STRONA - ZDJĘCIE */
.viamed-card__image-link {
    flex: 0 0 40%; /* Stałe 40% szerokości, nie kurczy się */
    min-width: 140px;
    position: relative;
    text-decoration: none;
}

.viamed-card__image {
    width: 100%;
    height: 100%; /* Wypełnia całą wysokość karty */
    object-fit: cover; /* Kluczowe: zdjęcie wypełnia przestrzeń bez deformacji */
    background-size: cover;
    background-position: center top;
    display: block;
}

/* --- PRAWA STRONA (TREŚĆ) --- */
.viamed-card__content {
    flex-grow: 1;
    padding: 25px; /* Trochę więcej oddechu */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.viamed-card__title {
    margin: 0 0 10px 0;
    font-size: 1.35rem; /* Trochę większa czcionka nazwiska */
    font-weight: 700;
    line-height: 1.2;
}

.viamed-card__title a {
    text-decoration: none;
    color: #2D3748;
}

.viamed-card__subtitle {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 20px;
    white-space: normal; 
}

.viamed-card__btn {
    text-decoration: none;
    color: #3182CE;
    font-weight: bold;
    font-size: 0.95rem;
}

/* --- MOBILE --- */
@media (max-width: 900px) {
    .viamed-lekarze-grid {
        grid-template-columns: 1fr; 
        max-width: 500px;
    }
    .viamed-card {
        flex-direction: column; /* Na telefonie jeden pod drugim */
        height: auto; /* Reset wysokości na auto */
    }
    .viamed-card__image-link {
        width: 100%;
        /* Na telefonie ustawiamy dużą wysokość zdjęcia */
        height: 300px; 
    }
    .viamed-card__image {
        min-height: 300px; /* Wymuszenie wysokości na mobile */
    }
    .viamed-card__content {
        width: 100%;
    }
    #lekarz-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    #lekarz-filter-form input[type="text"],
    #lekarz-filter-form select,
    #lekarz-filter-form button {
        width: 100%;
        min-width: 0;
    }
}