
.container-1 {
    display: flex;
    justify-content: center;/* Center the box horizontally */
    align-items: center; /* Center the box vertically */
    padding: 20px; /* Add padding to ensure content isn't right at the edge */
    box-sizing: border-box;
}

.boxContact {
    width: 400px;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative; /* Maintain a relative position for child absolute elements */
    margin: 20px; /* Add margin to separate it from other content */
}

.imgBx {
    width: 100%;
    height: 100%;
    transition: 0.5s;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Maintain relative positioning within the box */
}

.boxContact:hover .imgBx {
    transform: translateY(-100px);
}

.imgBx img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.boxContact:hover .imgBx img {
    opacity: 0.5;
}

.social-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    margin: 0;
    padding: 0;
    transition: 0.5s;
}

.social-icon li {
    list-style: none;
}

.social-icon li a {
    display: block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background: #fff;
    color: #262626;
    margin: 0 5px;
    border-radius: 50%;
    transition: 0.5s;
    transform: translateY(200px);
    opacity: 0;
}

.boxContact:hover .social-icon li a {
    transform: translateY(0px);
    opacity: 1;
}

.boxContact .social-icon li a .fa-brands {
    transition: 0.5s;
    font-size: 24px;
    line-height: 50px;
}

.boxContact .social-icon li a:hover .fa-brands {
    transform: rotateY(360deg);
}

.boxContact:hover .social-icon li:nth-child(1) a {
    transition-delay: 0s;
}

.boxContact:hover .social-icon li:nth-child(2) a {
    transition-delay: 0.2s;
}

.boxContact:hover .social-icon li:nth-child(3) a {
    transition-delay: 0.4s;
}

.boxContact:hover .social-icon li:nth-child(4) a {
    transition-delay: 0.6s;
}


.details {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #fff;
    z-index: 4;
    width: 100%;
    height: 100px;
    box-sizing: border-box;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.5s;
}

.boxContact:hover .details {
    opacity: 1;
}

.details h2 {
    margin: 10px 0 0;
    padding: 0;
    text-align: center;
}

.details h2 span {
    color: #bbb;
    font-size: 16px;
}
@media (max-width: 480px) {
    .boxContact {
        width: 90vw; /* Adjust width to fit within viewport width */
        height: auto; /* Adjust height to auto for flexibility */
        margin: 10px; /* Reduce margin for better fit */
    }

    .imgBx {
        height: 250px; /* Adjust height for smaller screen */
    }

    .details {
        height: auto; /* Adjust height to auto for flexibility */
        padding: 10px; /* Adjust padding for better fit */
    }
}
@media (max-width:780px) {
    .container-1 {
        flex-direction: column; /* Arrange items in a column */
        align-items: center; /* Center items horizontally */
    }

    .boxContact {
        width: 90vw; /* Adjust width to fit within viewport width */
        height: auto; /* Adjust height to auto for flexibility */
        margin: 10px 0; /* Adjust margin for better fit */
    }

    .imgBx {
        height: 250px; /* Adjust height for smaller screen */
    }

    .details {
        height: auto; /* Adjust height to auto for flexibility */
        padding: 10px; /* Adjust padding for better fit */
    }
}