﻿.profile_01 {
    position: relative;

}

.profile_01_box {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

    .profile_01_box img {
        width: 100%;
        display: block;
        border-radius: 8px;
        transition: transform 0.4s ease;
    }

/* Overlay */
.contentprofile {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 2;
    border-radius: 8px;
}

    /* Button style */
    .contentprofile a {
        color: #fff;
        font-weight: bold;
        font-size: 14px;
        text-decoration: none;
        background: #c70404;
        padding: 8px 16px;
        border-radius: 4px;
        transform: translateY(20px); /* hidden below */
        opacity: 0;
        transition: all 0.4s ease;
    }

/* Hover effect */
.profile_01_box:hover img {
    transform: scale(1.1); /* zoom image */
}

.profile_01_box:hover .contentprofile {
    opacity: 1;
}

    .profile_01_box:hover .contentprofile a {
        transform: translateY(0); /* slide up */
        opacity: 1;
    }
@media (max-width: 768px) {
    .contentprofile {
        opacity: 1; /* show overlay always */
        display: flex;
        align-items: flex-end; /* push content to bottom */
        justify-content: center;
        padding-bottom: 15px; /* space from bottom */
    }

        .contentprofile a {
            transform: translateY(0); /* no slide */
            opacity: 1; /* always visible */
        }
}