/* ── Root Variables ── */
:root {
    --accent:       #2563eb;
    --accent-light: #eff6ff;
    --accent-mid:   #bfdbfe;
    --gold:         #f59e0b;
    --text-dark:    #0f172a;
    --text-mid:     #475569;
    --text-soft:    #94a3b8;
    --card-radius:  18px;
    --trans:        all .32s cubic-bezier(.4,0,.2,1);
}
 
/* ── Section ── */
.teachers-section {
    padding: 80px 0 96px;
    background: #f8fafc;
    font-family: 'DM Sans', sans-serif;
}
 
/* ── Row: left-align so 1 card sits at start ── */
.teachers-row {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: flex-start;   /* ← start, not center */
}
 
/* ── Column sizing ── */
.teacher-col {
    flex: 0 0 calc(25% - 21px);   /* 4-col */
    min-width: 240px;
    max-width: 300px;
}
@media (max-width: 1199px) { .teacher-col { flex: 0 0 calc(33.33% - 19px); } }
@media (max-width: 767px)  { .teacher-col { flex: 0 0 calc(50% - 14px);    } }
@media (max-width: 479px)  { .teacher-col { flex: 0 0 100%; max-width:100%; } }
 
/* ── Card Shell ── */
.teacher-card {
    background: #fff;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15,23,42,.06), 0 0 0 1px rgba(15,23,42,.05);
    transition: var(--trans);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.teacher-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(37,99,235,.13), 0 0 0 1px rgba(37,99,235,.1);
}
 
/* ── Top accent bar ── */
.teacher-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.teacher-card:hover::before { transform: scaleX(1); }
 
/* ── Image Wrap ── */
.teacher-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #e0eaff 0%, #f0f9ff 100%);
}
.teacher-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
    display: block;
}
.teacher-card:hover .teacher-img-wrap img {
    transform: scale(1.05);
}
 
/* ── Social Overlay ── */
.teacher-social-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,.72) 0%, transparent 55%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 18px;
    gap: 10px;
    opacity: 0;
    transition: opacity .3s ease;
}
.teacher-card:hover .teacher-social-overlay { opacity: 1; }
 
.teacher-social-overlay a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    text-decoration: none;
    transition: var(--trans);
    transform: translateY(8px);
}
.teacher-card:hover .teacher-social-overlay a { transform: translateY(0); }
.teacher-social-overlay a:hover {
    background: var(--accent);
    color: #fff;
}
 
/* ── Body ── */
.teacher-body {
    padding: 20px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
 
/* ── Name + designation ── */
.teacher-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -.01em;
}
.teacher-designation {
    font-size: .78rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 0;
    margin-top: 2px;
}
 
/* ── Divider ── */
.teacher-divider {
    height: 1px;
    background: linear-gradient(90deg, var(--accent-mid), transparent);
    border: none;
    margin: 0;
}
 
/* ── Subjects ── */
.teacher-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.subject-pill {
    font-size: .7rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid var(--accent-mid);
    border-radius: 20px;
    padding: 2px 10px;
    letter-spacing: .02em;
}
 
/* ── Classes row ── */
.teacher-classes {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 7px 12px;
}
.teacher-classes i {
    color: var(--accent);
    font-size: .8rem;
    flex-shrink: 0;
}
.teacher-classes span {
    font-size: .75rem;
    color: var(--text-mid);
    font-weight: 500;
    line-height: 1.4;
}
 
/* ── Experience badge ── */
.teacher-exp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-mid);
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 5px 11px;
    width: fit-content;
}
.teacher-exp i { color: var(--gold); font-size: .8rem; }
.teacher-exp strong { color: var(--text-dark); }