﻿.card-hover {
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    min-height: 450px;
    max-width: 300px;
    min-width: 250px;
    margin: auto;
}

.card-img-top {
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 1 0 auto;
    }
}

.card-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.6rem 0;
    transition: opacity 0.3s ease;
}

.card-hover:hover .card-title-overlay {
    opacity: 0;
}

.card-body {
    position: absolute;
    bottom: 0;
    background: linear-gradient(360deg, #ffffff, #e1e1e1de);
    width: 100%;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 1.4s ease;
    min-height: 167%;
}

.card-hover:hover .card-body {
    transform: translateY(40%); /* parte più visibile della descrizione */
}

/* Responsive fix: center cards on smaller screens */
@media (max-width: 768px) {
    .card-hover {
        height: 400px;
    }
}
body{
    background-image: linear-gradient(45deg, black, transparent);
}

.container-fluid,
.container {
    max-width: 1200px;
}
.card-container {
    padding: 100px 0px;
    -webkit-perspective: 1000;
    perspective: 1000;
}


#insegnanti .profile-card-6 {
    max-width: 300px;
    height: 350px;
    padding: 0;
    background-color: #FFF;
    border-radius: 5px;
    box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

    #insegnanti .profile-card-6 img {
        transition: all 0.15s linear;
        width: 100%;
        height: 100%; /* o altezza desiderata */
        object-fit: cover;
        object-position: center center;
        display: block;
    }

    #insegnanti .profile-card-6 .profile-name {
        position: absolute;
        bottom: 10px;
        left: 10px;
        font-size: 24px;
        font-weight: bold;
        color: #FFF;
        padding: 15px 20px;
        background: linear-gradient(140deg, rgba(0, 0, 0, 0.4) 50%, rgba(255, 255, 0, 0) 50%);
        transition: all 0.15s linear;
    }

    #insegnanti .profile-card-6 .profile-position {
        position: absolute;
        color: rgba(255, 255, 255, 0.4);
        left: 30px;
        bottom: 100px;
        transition: all 0.15s linear;
    }

    #insegnanti .profile-card-6 .profile-overview {
        position: absolute;
        bottom: 0px;
        left: 0px;
        right: 0px;
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.4) 50%, rgba(255, 255, 0, 0));
        color: #FFF;
        padding: 50px 0px 20px 0px;
        transition: all 0.15s linear;
    }

        #insegnanti .profile-card-6 .profile-overview h3 {
            font-weight: bold;
        }

        #insegnanti .profile-card-6 .profile-overview p {
            color: rgba(255, 255, 255, 0.7);
        }

    #insegnanti .profile-card-6:hover img {
        filter: brightness(80%);
    }

    #insegnanti .profile-card-6:hover .profile-name {
        padding-left: 25px;
        padding-top: 20px;
    }

    #insegnanti .profile-card-6:hover .profile-position {
        left: 40px;
    }

    #insegnanti .profile-card-6:hover .profile-overview {
        padding-bottom: 25px;
    }


    .card-text:last-child {
        font-family: sans-serif;
    }
