*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background: #ccc6c6;
    overflow: hidden;
}
.profile{
    width: 250px;
    border-radius: 10px;
    /* border: 2px solid #fafafa; */
    animation: animate 1s ease-in-out 1 forwards;
    background-color: black;
}

.profile-modal {
    position: fixed;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 2000;
    display: none;
    width: 300px;
    border: 1px solid #ddd;
}

.profile-modal img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.profile-modal .header {
    text-align: center;
    margin-bottom: 15px;
}

.profile-modal .info {
    margin-top: 10px;
    color: #333;
}

.profile-modal .info p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.profile:hover {
    cursor: pointer;
}

.container{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px;
    height: 500px;
    background: #f5f5f5;
    box-shadow: 0 30px 50px #dbdbdb;
}

.container .slide .item{
    width: 200px;
    height: 300px;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    border-radius: 20px;
    box-shadow: 0 30px 50px #505050;
    background-position: 50% 50%;
    background-size: cover;
    display: inline-block;
    transition: 0.5s;
}

.slide .item:nth-child(1),
.slide .item:nth-child(2){
    top: 0;
    left: 0;
    transform: translate(0, 0);
    border-radius: 0;
    width: 100%;
    height: 100%;
}


.slide .item:nth-child(3){
    left: 50%;
}
.slide .item:nth-child(4){
    left: calc(50% + 220px);
}
.slide .item:nth-child(5){
    left: calc(50% + 440px);
}

/* here n = 0, 1, 2, 3,... */
.slide .item:nth-child(n + 6){
    left: calc(50% + 660px);
    opacity: 0;
}



.item .content{
    position: absolute;
    top: 35%;
    left: 100px;
    width: 300px;
    text-align: left;
    color: #eee;
    transform: translate(0, -50%);
    font-family: system-ui;
    display: none;
}


.slide .item:nth-child(2) .content{
    display: block;
}


.content .name{
    font-size: 40px;
    text-transform: uppercase;
    font-weight: bold;
    opacity: 0;
    animation: animate 1s ease-in-out 1 forwards;
    backdrop-filter: blur(10px);
    border-radius: 10px;
}

.content .des{
    margin-top: 10px;
    margin-bottom: 20px;
    opacity: 0;
    animation: animate 1s ease-in-out 0.3s 1 forwards;
}

.content button{
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    opacity: 0;
    animation: animate 1s ease-in-out 0.6s 1 forwards;
    position: relative;
    z-index: 2;
    border-radius: 20px;
}

.teacher-popup {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 350px;
    color: #333;
    transition: all 0.3s ease;
}

/* Add hover styles */
.content button:hover + .teacher-popup,
.teacher-popup:hover {
    display: block;
}

@keyframes animate {
    from{
        opacity: 0;
        transform: translate(0, 100px);
        filter: blur(33px);
    }

    to{
        opacity: 1;
        transform: translate(0);
        filter: blur(0);
    }
}



.button{
    width: 100%;
    text-align: center;
    position: absolute;
    bottom: 20px;
}

.button button{
    width: 40px;
    height: 35px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin: 0 5px;
    border: 1px solid #000;
    transition: 0.3s;
}

.button button:hover{
    background: #ababab;
    color: #fff;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .container {
        width: 90%;
        height: 80vh;
        background-image: url('img/BackgroundUniversal.jpg');
        background-size: cover;
        border-radius: 20px;

    }

    
    .container .slide .item {
        width: 180px;
        height: 270px;
    }

    .slide .item:nth-child(3) { left: 45%; }
    .slide .item:nth-child(4) { left: calc(45% + 200px); }
    .slide .item:nth-child(5) { left: calc(45% + 400px); }
}

@media screen and (max-width: 768px) {
    .container {
        height: 70vh;
    }

    .item .content {
        left: 50px;
        width: 250px;
    }

    .content .name {
        font-size: 30px;
    }

    .content .des {
        font-size: 14px;
    }

    .profile {
        width: 200px;
    }

    .profile-modal {
        width: 280px;
    }
}

@media screen and (max-width: 480px) {
    body {
        overflow-y: auto;
    }

    .container {
        height: 90vh;
        width: 95%;
    }

    .item .content {
        left: 20px;
        width: 200px;
    }

    .content .name {
        font-size: 24px;
    }

    .profile {
        width: 150px;
    }

    .teacher-popup {
        width: 280px;
        left: 50%;
        transform: translateX(-50%);
    }

    .button {
        bottom: 10px;
    }

    .button button {
        width: 35px;
        height: 30px;
    }
}

/* Fix scrolling issues on mobile */
@media screen and (max-height: 600px) {
    body {
        overflow-y: auto;
    }
    
    .container {
        position: relative;
        top: 20px;
        transform: translate(-50%, 0);
        margin-bottom: 40px;
    }
}