.container_with_section {
    display: flex;
    margin: 10px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.section {
    position: relative;
    width: 30vw;
    height: 45vh;
    background-color: #ccc;
    margin: 1vw;
    overflow: hidden;
    cursor: pointer;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section:hover::after {
    opacity: 0.4;
}

.section-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    /* Добавлен z-index, чтобы кнопка была поверх */
}

.section:hover .section-content {
    opacity: 1;
}

.section-content a {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 2;
    /* Убедимся, что кнопка на переднем плане */
}

.section-content a:hover {
    background-color: #0056b3;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .container_with_section {
        flex-wrap: wrap;
        gap: 10px;
    }

    .section {
        width: 90%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .section {
        width: 100%;
        height: 180px;
    }

    .section-content p {
        font-size: 1rem;
    }

    .section-content a {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}

/* Улучшение видимости текста и кнопок */
.section-content {
    padding: 18px 24px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 5px;
}

.section-content p {
    margin-bottom: 2vh;
    font-size: 1.5rem;
    /* Увеличенный текст */
    font-weight: bold;
}

/* Основной стиль для кнопки */
.section-content a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    padding: 12px 24px;
    background-color: #007bff;
    /* Цвет фона */
    border: none;
    color: white;
    border-radius: 8px;
    /* Скругление углов */
    cursor: pointer;
    transition: all 0.3s ease;
    /* Плавный переход */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Тень */
}

/* Эффект при наведении */
.section-content a:hover {
    background-color: #00b351;
    /* Темный оттенок синего */
    transform: translateY(-4px);
    /* Легкое поднятие кнопки */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    /* Увеличенная тень */
}

/* Эффект при фокусировке */
.section-content a:focus {
    outline: none;
    /* Убираем стандартный контур */
    box-shadow: 0 0 0 4px rgba(38, 113, 255, 0.6);
    /* Голубой контур при фокусе */
}