/* Зовнішня секція (фон сайту) */
.portfolio-section {
    padding: 80px 20px;
    background-color: #f0f2f5; /* Трохи темніший фон, щоб білий блок "світився" */
}

/* Внутрішній блок - "Острів" */
.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff; /* Білий фон всередині блоку */
    padding: 60px 40px;
    border-radius: 20px; /* Ті самі гладкі краї */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04); /* Дуже м'яка тінь */
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #222222;
    text-align: center;
    margin-bottom: 50px;
}

/* Сітка карток */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Картка роботи */
.portfolio-card {
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 10px; /* Гладкі краї для самих карток */
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

/* Контейнер картинки */
.card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Накладання при наведенні */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(153, 153, 153, 0.4); /* Напівпрозорий темний фон */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

/* Кнопка "Дивитись" */
.play-btn {
    padding: 12px 30px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 50px; /* Повністю округла кнопка */
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.portfolio-card:hover .play-btn {
    transform: translateY(0);
}

.play-btn:hover {
    background-color: #0056b3;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* Інфо блок */
.card-info {
    padding: 25px;
}

.card-info h4 {
    font-family: 'Montserrat', sans-serif;
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    color: #222;
    font-weight: 700;
}

.card-info p {
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    color: #777;
    line-height: 1.5;
    margin: 0;
}

/* Адаптація для мобільних пристроїв */
@media (max-width: 768px) {
    .portfolio-container {
        padding: 40px 20px;
        border-radius: 20px;
        margin: 0 10px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 50px !important;
    }
}