/* ============================================================
   DOCTOR TEAM WIDGET
   ============================================================ */

.doctor-team-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 0 auto;
    padding: 0 20px;            /* ไม่มี padding-top เพื่อไม่ให้รูปล้นบน */
    gap: 0;
    min-height: 500px;

}

.doctor-item {
    position: relative;
    cursor: pointer;
    max-width: 260px;
    margin: 0 -20px;            /* ซ้อนเหลื่อมกันมากขึ้น */
    z-index: 1;
    transform-origin: bottom center;
    transition: transform 0.6s cubic-bezier(.25,.8,.25,1),
                z-index 0s 0.6s;
}

.doctor-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transform-origin: bottom center;
    transition: transform 0.6s cubic-bezier(.25,.8,.25,1);
    vertical-align: bottom;     /* ป้องกันช่องว่างใต้รูป */
}

/* Hover */
.doctor-item:hover {
    z-index: 10;
    transition: transform 0.6s cubic-bezier(.25,.8,.25,1),
                z-index 0s;
}

.doctor-item:hover img {
    transform: scale(1.1);
}

/* ============================================================
   Info Badge
   ============================================================ */
.doctor-info {
    position: absolute;
    left: 20px;                 /* ชิดซ้ายเหมือนในภาพ */
    bottom: 20px;
    transform: translateY(15px);
    opacity: 0;
    visibility: hidden;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 20px;
    border-radius: 12px;
    color: #fff;
    min-width: 240px;
    text-align: left;
    transition: opacity 0.45s ease,
                transform 0.45s cubic-bezier(.25,.8,.25,1),
                visibility 0s 0.45s;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.08);
    z-index: 20;
}

.doctor-item:hover .doctor-info {
    opacity: 1;
    visibility: visible;
    bottom: 45%;
    transform: translateY(0);
    transition: opacity 0.45s ease,
                transform 0.45s cubic-bezier(.25,.8,.25,1),
                visibility 0s;
}

.doctor-info small {
    color: #4facfe;
    font-size: 12px;
    display: block;
    margin-bottom: 6px;
    font-weight: 400;
}
.doctor-info h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.doctor-info p {
    margin: 0 0 6px;
    font-size: 14px;
    opacity: 0.75;
}
.doctor-info .pos-text {
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.55;
}

/* ============================================================
   Popup
   ============================================================ */
.doctor-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
    z-index: 9999;
}
.doctor-popup.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0s;
}
.popup-inner {
    display: flex;
    background: #fff;
    max-width: 900px;
    width: 90%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.popup-inner img{
	height:100%;
}

/* ปรับแต่งสำหรับหน้าจอมือถือ (ขนาดจอไม่เกิน 767px) */
@media (max-width: 767px) {
    .doctor-team-wrap {
        /* ลดความสูงขั้นต่ำลงเพื่อให้พอดีกับรูปในมือถือ */
        min-height: 200px; 
    }

	.doctor-item {
    margin: 0 -10px;     
	}

}