/* карточки на главной странице */
/* мой вариант
.card {
    display: flex; */
    /* justify-content: space-around; флекс элементы равномерно распределяются по всей строке */
    /* justify-content: space-evenly;
    flex-wrap: wrap; 
} */

/* мой вариант
@media (max-width: 300px) {
    .card > div
    {
        max-width: 200px;
    }
}

@media (min-width: 301px) {
    .card > div
    {
        max-width: 300px;
    }
} */

/* мой вариант
.card > div {
    display: flex;
    border: 2px solid var(--tem-zel);
    border-radius: 20px;
    padding: 20px;
    margin: 10px;
    justify-content: center;
    flex-wrap: wrap;
    background-color: var(--sv-rozov);
} */

.card {
    width: 100%;
    justify-content: center;
    display: grid;
    grid-template-columns: repeat(auto-fill,200px);
    gap: 10px;
    /* Отступы между элементами */ 

    /* Автоматическое определение количества колонок */
  /* grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));  */

    /* ВЕРТИКАЛЬНОЕ ЦЕНТРИРОВАНИЕ */
  /* align-items: center;  */

  /* Дополнительно: горизонтальное центрирование */
  /* justify-items: center; */
  
  /* Или всё сразу (рекомендуется): */
  /* place-items: center; */
}

.card > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border: 2px solid var(--tem-zel);
    border-radius: 20px;
    padding: 20px;
    background-color: var(--sv-rozov);
    width: auto;
    max-width: 300px;
}

.card button {
    width: 150px;
    height: 40px;
    margin: 5px;    
    font-family: 'Times New Roman', serif;
    font-size: 17px;
    color: var(--bordovii);
    background-color: var(--rozovii);
    border-radius: 20px;
    border: 2px var(--tem-zel);  
    box-shadow: 1px 1px 5px var(--teni_menu);   
  /* margin-top: 50px; */
    /* margin-bottom: 10px; */
     /* bottom: 0; */
}

.card button:hover  {
    color: var(--rozovii); 
    background-color: var(--bordovii);  
    /* position: fixed;   */
    /* margin-bottom: 10px; */
     /* bottom: 0; */
}

.card img {
    max-width: calc(100% - 10px) ;  
    max-height: 400px;
    /* object-fit: cover; */
    border: 2px var(--tem-zel);
    /* border: 2px solid var(--tem-zel); */
    box-shadow: 1px 1px 5px var(--teni_menu);
    border-radius: 20px;
    margin-left: 10px;
    margin-right: 15px;
    margin-bottom: 10px;
    float: left;
    /* padding: 15px; */
}

.card a:hover {
    background-color: none;
}

.card p {
    text-align: center;
    /* задаём выравнивание текста по ширине */
    text-indent: 0;
    color: var(--bordovii);
    /* margin: 10px auto; */
    margin-bottom: 10px;
}