/* ==============================================================
   CREATIVE CIRCULAR TEACHER CARDS (CLEAN & MOBILE RESPONSIVE)
   ============================================================== */

.teachers-grid-circle {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 50px;
}

/* 1. Base States (Pre-scroll hidden state) */
.teacher-card-circle {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    
    /* Hidden State */
    background: transparent;
    border: 3px solid transparent;
    box-shadow: none;
    transform: scale(0.8);
    transition: all 0.5s ease-out; 
}

.teacher-img-circle {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 5px solid #2d3436;
    overflow: hidden;
    z-index: 2;
    background: #fff;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.img-top-left { 
    top: -15px; 
    left: -15px; 
    opacity: 0;
    transform: translate(-100px, 30px) scale(0.5) rotate(-45deg); 
}

.img-top-right { 
    top: -15px; 
    right: -15px; 
    opacity: 0;
    transform: translate(100px, 30px) scale(0.5) rotate(45deg); 
}

.teacher-info-circle {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease-out;
}

.teacher-img-circle img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.teacher-info-circle h3 { 
    color: #fff; 
    font-size: 1.5rem; 
    margin-bottom: 5px; 
    margin-top: 10px; 
}

.teacher-info-circle .designation { 
    display: block; 
    color: #ff9f43; 
    font-weight: bold; 
    font-size: 0.9rem; 
    margin-bottom: 15px; 
}

.teacher-info-circle p { 
    color: #ccc; 
    font-size: 0.85rem; 
    line-height: 1.5; 
    margin-bottom: 15px; 
}

/* Read More Button */
.read-more-btn {
    background: transparent; 
    color: #ff4d6d; 
    border: 2px solid #ff4d6d;
    padding: 6px 18px; 
    border-radius: 20px; 
    font-size: 0.85rem; 
    font-weight: bold;
    cursor: pointer; 
    transition: 0.3s; 
    pointer-events: auto;
}

.read-more-btn:hover { 
    background: #ff4d6d; 
    color: #fff; 
}

/* --- 2. Scrolled States (Visible state on screen) --- */
.teachers-grid-circle.scrolled .teacher-card-circle {
    background: #2d3436;
    border-color: #ff4d6d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: scale(1);
    transition-delay: 0.3s; 
}

.teachers-grid-circle.scrolled .img-top-left,
.teachers-grid-circle.scrolled .img-top-right {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg); 
    transition-delay: 0s;
}

.teachers-grid-circle.scrolled .teacher-info-circle {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s; 
}

/* Hover effect */
.teachers-grid-circle.scrolled .teacher-card-circle:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 77, 109, 0.4);
}

/* --- 3. MOBILE RESPONSIVE FIXES (MEKA THAMAI WADAGATHMA) --- */
@media (max-width: 768px) {
    .teachers-grid-circle {
        gap: 30px; /* Mobile eke gap eka adu kala */
        margin-top: 30px;
    }
    
    .teacher-card-circle { 
        width: 290px;  /* Phone ekata fit wenna size eka haduwa */
        height: 290px; 
        padding: 20px;
    }
    
    .teacher-img-circle {
        width: 100px;
        height: 100px;
    }
    
    /* Mobile waladi eliyata paninne nathi wenna translate eka podi kala */
    .img-top-left { 
        top: -10px; left: -10px;
        transform: translate(-40px, 20px) scale(0.5) rotate(-45deg); 
    }
    
    .img-top-right { 
        top: -10px; right: -10px;
        transform: translate(40px, 20px) scale(0.5) rotate(45deg); 
    }
    
    .teacher-info-circle h3 { font-size: 1.2rem; margin-top: 5px; }
    .teacher-info-circle .designation { font-size: 0.8rem; margin-bottom: 10px; }
    .teacher-info-circle p { font-size: 0.75rem; margin-bottom: 10px; }
    .read-more-btn { padding: 5px 15px; font-size: 0.8rem; }
}

/* --- TEACHER ARTICLE POPUP (MODAL) --- */
.teacher-modal-content {
    background: #f8f9fa;
    width: 90%;
    max-width: 600px;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

.teacher-modal-content img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ff4d6d;
    margin-top: -80px; 
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .teacher-modal-content { padding: 30px 20px; margin-top: 30px; }
    .teacher-modal-content img { width: 100px; height: 100px; margin-top: -60px; }
}