/*
 * Стилі для нового дизайну картки клініки
 */
.clinics__article--new-style {
    position: relative;
    overflow: hidden; 
    border-radius: 15px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); 
    display: flex; 
    flex-direction: column;
    height: 350px; 
    background-size: cover; 
    background-position: center; 
    color: #fff; 
    text-decoration: none; 
}

/* Оверлей (темне затемнення для кращої читабельності тексту) */
.clinics__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
/*    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 60%); */
    z-index: 1; 
}

/* ====================================================== */
/* 2. БЛОК ОСНОВНОГО КОНТЕНТУ (ГНУЧКІ РОЗМІРИ) */
/* ====================================================== */

.clinics__body--new-style {
    /* 1. Позиціонування: */
    position: absolute;
    top: 50%;  
    transform: translateY(-50%);  
    
    left: 20px; /* Фіксований відступ зліва */
    
    /* Гнучкі розміри */
    max-width: 349px; 
    /* Ширина, що займає доступний простір: 100% - лівий_відступ(20) - правий_відступ(20) - простір_для_бейджів(150) */
    width: calc(100% - 40px - 150px); 
    
    /* 2. Фон та оформлення: */
    backdrop-filter: blur(1.0px) !important; /* розмиття 5.9 - багато -  на око */
    -webkit-backdrop-filter: blur(1.0px) !important;
    
    
    background: rgba(33, 32, 32, 0.7) !important; /* Новий напівпрозорий фон */
    border-radius: 10px; 
    padding: 30px; 
    z-index: 2;  
    
    /* 3. Внутрішнє вирівнювання: */
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    color: #fff;
}

/* Напис 1: Назва клініки (24px, Bold 700) */
.clinics__body--new-style .clinics__name {
    font-family: 'Inter', sans-serif;
    font-weight: 700; 
    font-size: 24px;
    line-height: 1; 
    margin-bottom: 20px;
    color: #fff;
}

/* Напис 2: Локація (13px, Regular 400) */
.clinics__location {
    font-family: 'Inter', sans-serif;
    font-weight: 400; 
    font-size: 13px;
    line-height: 1.5; 
    margin-bottom: 30px; 
    opacity: 0.9;
}

/* Чергування фону*/
    /* Головна */
        /* Непарні (1,3,5...) */
        .home-clinics__slide:nth-child(odd) .clinics__body--new-style,
        .home-clinics__slide:nth-child(odd) .clinics__meta-box,
        .home-clinics__slide:nth-child(odd) .clinics__badge {
            background: #212020B2 !important;
        }
        /* Парні (2,4,6...) */
        .home-clinics__slide:nth-child(even) .clinics__body--new-style,
        .home-clinics__slide:nth-child(even) .clinics__meta-box,
        .home-clinics__slide:nth-child(even) .clinics__badge {
            background: #17466BCC !important;
        }
    /* Фільтри */
        /* Непарні: 1, 3, 5... */
        .clinics__item:nth-child(odd) .clinics__body--new-style,
        .clinics__item:nth-child(odd) .clinics__meta-box,
        .clinics__item:nth-child(odd) .clinics__badge {
            background: #212020B2 !important;
        }
        
        /* Парні: 2, 4, 6... */
        .clinics__item:nth-child(even) .clinics__body--new-style,
        .clinics__item:nth-child(even) .clinics__meta-box,
        .clinics__item:nth-child(even) .clinics__badge {
            background: #17466BCC !important;
        }
        
            /* Фільтри вибір*/
        /* Непарні: 1, 3, 5... */
        .clinic__item:nth-child(odd) .clinics__body--new-style,
        .clinic__item:nth-child(odd) .clinics__meta-box,
        .clinic__item:nth-child(odd) .clinics__badge {
            background: #212020B2 !important;
        }
        
        /* Парні: 2, 4, 6... */
        .clinic__item:nth-child(even) .clinics__body--new-style,
        .clinic__item:nth-child(even) .clinics__meta-box,
        .clinic__item:nth-child(even) .clinics__badge {
            background: #17466BCC !important;
        }


/* Стилі для КНОПОК */
.clinics__link {
    display: block;  
    width: 100%; /* Гнучкий розмір */
    padding: 12px 15px;
    border-radius: 8px;  
    text-align: center;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 15px; 
}

/* Кнопка 1: "Подробнее" (Блакитна) */
.clinics__link--more {
    background-color: rgba(10, 177, 255, 1); 
    color: #fff;
    border: 1px solid rgba(10, 177, 255, 1);
}
.clinics__link--more:hover {
    background-color: rgba(10, 177, 255, 0.8);
    border-color: rgba(10, 177, 255, 0.8);
}

/* Кнопка 2: "Консультація" */
.clinics__link--consultation {
    background-color: transparent;  
    color: #fff;
    border: 1px solid #fff; 
}
.clinics__link--consultation:hover {
    background-color: rgba(255, 255, 255, 0.2);  
    border-color: #fff;
}


/* ====================================================== */
/* 3. БЛОК РЕЙТИНГУ (Верхній правий кут) */
/* ====================================================== */

.clinics__meta-box {
    position: absolute;
    top: 35px;
    right: 20px;
    z-index: 2;
    /* Розміри контейнера */
    width: 143px; 
    height: 84px;
    
    /* Фон та оформлення */
    background-color:rgba(33, 32, 32, 0.7);
    backdrop-filter: blur(1.0px); /* Можна додати легке розмиття для рейтингу, якщо потрібно */
    border-radius: 10px; 
    
    /* Вирівнювання вмісту всередині */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 0; 
    
    color: #fff; 
    text-align: center;
}

/* Оцінка рейтингу та зірочка */
.clinics__rating {
    display: flex;
    align-items: center;
    background-color: transparent;  
    padding: 0;
    margin-bottom: 5px; 
}

/* Текст оцінки (40px, Bold 700) */
.clinics__rating .clinics__score {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 40px;
    line-height: 1; 
    letter-spacing: 0%;
    margin-right: 5px;
    color: #fff; 
}

/* Зірочка SVG */
.clinics__rating .icon-star {
    width: 30px; 
    height: 30px;
    fill: #fff; /* Білий колір */
    margin-left: 0;
    flex-shrink: 0; 
}

/* Текст кількості відгуків (10px, Light 300) */
.clinics__reviews-count {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 10px;
    line-height: 1; 
    letter-spacing: 0%;
    margin-top: 0;
    color: #fff; 
    opacity: 1; 
}

/* ====================================================== */
/* 4. БЛОК БЕЙДЖІВ/ТЕГІВ (Нижній правий кут) */
/* ====================================================== */

.clinics__badges {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 2; 
    display: flex;
    flex-direction: column; 
    gap: 10px; 
    align-items: flex-end; 
    margin: 0px 0px 13px 0px;
}

.clinics__badge {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 20px;
    background-color: rgba(33, 32, 32, 0.7); /* Темний фон, узгоджений з блоком контенту */
    white-space: nowrap;  
    
    /* Стиль шрифту (13px, Regular 400) */
    font-family: 'Inter', sans-serif;
    font-weight: 400; 
    font-size: 13px;
    line-height: 1; 
    color: #fff; 
    margin: 0; 
}

/* Стилі для бейджа з прапором */
.clinics__flag {
    display: flex;
    align-items: center;
}

.clinics__flag-img {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    margin-left: 10px; /* Проміжок між прапором та текстом */
    flex-shrink: 0;
  
}

/* Стилі для звичайних тегів */
.clinics__tag-item {
    background-color: rgba(33, 32, 32, 0.7); 
    padding: 8px 15px; 
    margin: 0; 
}


/* ====================================================== */
/* 5. МЕДІА-ЗАПИТИ ДЛЯ МОБІЛЬНИХ (МАКС. ШИРИНА 767PX) */
/* ====================================================== */
@media (max-width: 767px) {
    
    
    /*0. Зняти обмеження висоти*/
    .clinics__article--new-style {
        /* Скасовуємо фіксовану висоту 350px, дозволяючи адаптуватися до контенту */
        height: auto; 
    }
    
    
    
    /* 1. Блок контенту: переміщення та зміна розмірів */
    .clinics__body--new-style {
        /* Скасування вертикального центрування */
        top: auto; 
        transform: none; 
        bottom: 0; /* Притискаємо до нижнього краю */
        left: 0; /* Притискаємо до лівого краю */
        
        /* Розміри: на всю ширину картки */
        width: auto;
        max-width: 100%;
        min-height: auto; /* Висота по контенту */
        
        /* Відступ */
        padding: 20px 20px 20px 10px; /* з середини*/
        margin: 10px 10px 10px 10px; /*зовні */
        
        /* Видаляємо заокруглення знизу, щоб "приклеїти" до краю картки */
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        
        /* Градієнт оверлею повинен бути більш насиченим у цій зоні */
        background: linear-gradient(to top, rgba(33, 32, 32, 0.9) 0%, rgba(33, 32, 32, 0.7) 100%) !important;
        
        
    }
    
    /* 2. Заголовки та локація (робимо трохи меншими) */
    .clinics__body--new-style .clinics__name {
        font-size: 1.5em; /* Зменшуємо розмір заголовка */
        margin-bottom: 10px;
    }

    .clinics__location {
        font-size: 0.85em; /* Зменшуємо розмір локації */
        line-height: 1.3;
        margin-bottom: 20px;
    }

    /* 3. Кнопки: на всю ширину і менші відступи */
    .clinics__link {
        width: 100%; 
        margin-bottom: 10px; /* Зменшуємо відступ між кнопками */
    }

    /* 4. Блок рейтингу: переміщення на верхній лівий кут */
    .clinics__meta-box {
        top: 20px; /* Відступ від верхнього краю */
        left: 20px; /* Відступ від лівого краю */
        right: auto; /* Скасовуємо позицію справа */
        
        /* Зберігаємо розміри 143x84 */
    }
    
    /* 5. Блок бейджів/тегів: переміщення та гнучкість */
    .clinics__badges {
        top: 120px; /* Розміщуємо під рейтингом (84px висота + 20px відступ + 16px відступ) */
        left: 20px; /* Від лівого краю */
        right: 20px; /* До правого краю */
        bottom: auto; /* Скасовуємо позицію знизу */
        
        flex-direction: row; /* Розміщуємо бейджі горизонтально */
        flex-wrap: wrap; /* Дозволяємо перенесення на новий рядок */
        gap: 8px; /* Менший проміжок між елементами */
        
        /* Перебиваємо фон, щоб бейджі були окремими плашками */
        background-color: transparent; 
    }

    /* Прибираємо фон з бейджів і залишаємо тільки для тексту */
    .clinics__badge {
        background-color: rgba(33, 32, 32, 0.7); /* Повертаємо фон на кожен бейдж */
        line-height: 1.1;
        padding: 6px 10px; /* Менший внутрішній відступ */
        font-size: 12px; /* Трохи менший шрифт */
    }
    
    /* Оверлей фону, щоб він не перекривав контент внизу */
    .clinics__overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 100%); /* Зменшуємо ефект, оскільки блок контенту має свій фон */
    }
}


/* ================================= */
/* 6. Відстань між картками вибір картки */
/* ================================= */
@media (min-width: 1024px) {
    .clinics__item:not(:last-child) {
        margin-bottom: 37px !important; /*альт 67*/
    }
        .clinic__item:not(:last-child) {
        margin-bottom: 37px !important; /*альт 67*/
    }
}

@media (max-width: 1023px) {
    .clinics__item:not(:last-child) {
        margin-bottom: 37px !important;
    }
 .clinic__item:not(:last-child) {
        margin-bottom: 37px !important;
    }   
}

/* ================================= */
/* 7. Значок позиція                 */
/* ================================= */

.my-icon-location {
    margin: 2px 2px 20px 2px;
}

/* ================================= */
/* 8. Головна Відстань між картками  */
/* ================================= */

.home-clinics__slide:not(:last-child) {
    margin-bottom: 37px !important;
}

/* 9 */
@media (max-width: 767px) {
    .clinics__article--new-style {
        min-height: 525px; /* фіксовано */
        display: flex;
        flex-direction: column;
        justify-content: flex-end; /* щоб текст завжди був знизу */
        padding-bottom: 20px;
    }
}


