/* ==========================================
   🎓 TEACHER IN CHARGE - Liquid Glass Card (Portrait Image Style)
   ========================================== */
.teacher-card {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.55) 100%);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    padding: 30px 24px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 -1px 0 rgba(0, 0, 0, 0.03) inset,
        0 25px 55px -20px rgba(185, 28, 28, 0.15),
        0 8px 24px -8px rgba(245, 158, 11, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.teacher-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent);
    pointer-events: none;
}

.teacher-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 1);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 30px 65px -18px rgba(220, 38, 38, 0.25),
        0 10px 26px -8px rgba(245, 158, 11, 0.2);
}

/* Loading State */
.teacher-card-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
}

.teacher-card-loading i {
    font-size: 2.5rem;
    opacity: 0.8;
}

/* Content State */
.teacher-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 22px;
    position: relative;
    z-index: 1;
    animation: teacherFadeIn 0.6s ease forwards;
}

@keyframes teacherFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 🛑 පින්තූරය - දැන් ගානට පොඩි කරලා */
.teacher-card-media {
    width: 100%; 
    max-width: 270px; /* Mobile එකේ ගානට පේන්න පොඩි කළා (කලින් 310px) */
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(245, 158, 11, 0.35);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 15px 35px -5px rgba(245, 158, 11, 0.2);
    flex-shrink: 0;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    margin: 0 auto; 
    background-color: #f1f5f9;
}

.teacher-card:hover .teacher-card-media {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px -5px rgba(245, 158, 11, 0.35);
    border-color: rgba(245, 158, 11, 0.6);
}

.teacher-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.teacher-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.teacher-card-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.3px;
    margin: 0;
    line-height: 1.3;
}

.teacher-card-post {
    font-size: 1rem;
    font-weight: 800;
    color: #b91c1c;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.teacher-card-desc {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.8;
    margin: 0;
    text-align: justify;
    text-align-last: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Desktop adjustments */
@media (min-width: 768px) {
    .teacher-card { padding: 40px 45px; }
    
    /* PC එකේදී ෆොටෝ එක වම් පැත්තටත් විස්තරේ දකුණු පැත්තටත් */
    .teacher-card-content { 
        flex-direction: row; 
        text-align: left; 
        gap: 38px; 
        align-items: flex-start;
    }
    
    .teacher-card-info { 
        text-align: left; 
        margin-top: 10px; 
    }
    
    .teacher-card-desc { 
        text-align: justify; 
        text-align-last: left; 
        margin: 0; 
        max-width: none; 
    }
    
    /* 🛑 PC එකේදී image එක ගානට පොඩි කළා (කලින් 280px) */
    .teacher-card-media { 
        width: 220px;
        max-width: 220px;
        margin: 0; 
    }
    
    .teacher-card-name { font-size: 1.9rem; }
}