/* ================================================
   NEW MODEL SCHOOL — Teachers Widget v1.0
   Brand: Purple #5C3D8F · Magenta #E91E8C
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

/* ── Section ── */
.nmst-section {
    width: 100% !important;
    background: #F8F6FF !important;
    padding: 80px 0 !important;
    font-family: 'Poppins', sans-serif !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
}

.nmst-section::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background-image: radial-gradient(circle, rgba(92,61,143,0.05) 1px, transparent 1px) !important;
    background-size: 28px 28px !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

.nmst-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 40px !important;
    position: relative !important;
    z-index: 1 !important;
}

/* ── Header ── */
.nmst-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 50px !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.nmst-header-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.nmst-squiggle {
    margin-bottom: 4px !important;
}

.nmst-title {
    font-family: 'Nunito', sans-serif !important;
    font-size: clamp(1.8rem, 4vw, 2.6rem) !important;
    font-weight: 800 !important;
    color: #2D1B5E !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
}

/* ── Button ── */
.nmst-btn-all {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #E91E8C !important;
    color: #ffffff !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    padding: 14px 28px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    transition: background 0.22s ease, transform 0.18s ease, box-shadow 0.22s ease !important;
    box-shadow: 0 4px 18px rgba(233,30,140,0.35) !important;
    align-self: center !important;
}
.nmst-btn-all:hover {
    background: #c4166f !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(233,30,140,0.45) !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Grid ── */
.nmst-grid {
    display: grid !important;
    gap: 36px !important;
}
.nmst-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.nmst-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.nmst-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
.nmst-cols-5 { grid-template-columns: repeat(5, 1fr) !important; }
.nmst-cols-6 { grid-template-columns: repeat(6, 1fr) !important; }

/* ── Teacher Card ── */
.nmst-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 32px 20px 28px !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid rgba(92,61,143,0.10) !important;
    box-shadow: 0 4px 20px rgba(92,61,143,0.07) !important;
    transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.28s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.nmst-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    height: 4px !important;
    background: linear-gradient(to right, #5C3D8F, #E91E8C) !important;
    transform: scaleX(0) !important;
    transform-origin: left !important;
    transition: transform 0.35s ease !important;
}
.nmst-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px rgba(92,61,143,0.16) !important;
}
.nmst-card:hover::before {
    transform: scaleX(1) !important;
}

/* ── Photo ── */
.nmst-photo-wrap {
    width: 150px !important;
    height: 150px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin-bottom: 22px !important;
    border: 4px solid #ffffff !important;
    box-shadow:
        0 0 0 3px rgba(233,30,140,0.18),
        0 8px 28px rgba(92,61,143,0.15) !important;
    flex-shrink: 0 !important;
    background: #F0EBFF !important;
    position: relative !important;
    transition: box-shadow 0.28s ease !important;
}
.nmst-card:hover .nmst-photo-wrap {
    box-shadow:
        0 0 0 4px rgba(233,30,140,0.40),
        0 12px 36px rgba(92,61,143,0.22) !important;
}

.nmst-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    transition: transform 0.4s ease !important;
}
.nmst-card:hover .nmst-photo {
    transform: scale(1.05) !important;
}

/* ── Avatar Placeholder ── */
.nmst-avatar-placeholder {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #5C3D8F, #E91E8C) !important;
    color: #ffffff !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 42px !important;
    font-weight: 800 !important;
    letter-spacing: -1px !important;
}

/* ── Info ── */
.nmst-info {
    width: 100% !important;
}

.nmst-name {
    font-family: 'Nunito', sans-serif !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #2D1B5E !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    transition: color 0.22s ease !important;
}
.nmst-card:hover .nmst-name {
    color: #5C3D8F !important;
}

.nmst-position {
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #E91E8C !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

.nmst-qualification {
    font-family: 'Poppins', sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 400 !important;
    color: #8B7BAD !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

/* ── Empty state ── */
.nmst-empty {
    text-align: center !important;
    padding: 60px 20px !important;
    color: #8B7BAD !important;
    font-size: 15px !important;
}

/* ── Animations ── */
@keyframes nmst-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes nmst-pop-in {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.nmst-header {
    animation: nmst-fade-up 0.65s ease both !important;
}
.nmst-card {
    animation: nmst-pop-in 0.55s ease both !important;
    animation-delay: var(--nmst-delay, 0ms) !important;
}
.nmst-card:nth-child(1)  { --nmst-delay: 0ms; }
.nmst-card:nth-child(2)  { --nmst-delay: 80ms; }
.nmst-card:nth-child(3)  { --nmst-delay: 160ms; }
.nmst-card:nth-child(4)  { --nmst-delay: 240ms; }
.nmst-card:nth-child(5)  { --nmst-delay: 320ms; }
.nmst-card:nth-child(6)  { --nmst-delay: 400ms; }
.nmst-card:nth-child(n+7){ --nmst-delay: 480ms; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .nmst-cols-5 { grid-template-columns: repeat(3, 1fr) !important; }
    .nmst-cols-6 { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 900px) {
    .nmst-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .nmst-cols-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px) {
    .nmst-section { padding: 52px 0 !important; }
    .nmst-container { padding: 0 20px !important; }
    .nmst-cols-2,
    .nmst-cols-3,
    .nmst-cols-4,
    .nmst-cols-5,
    .nmst-cols-6 { grid-template-columns: repeat(2, 1fr) !important; }
    .nmst-photo-wrap { width: 120px !important; height: 120px !important; }
    .nmst-name { font-size: 15px !important; }
    .nmst-grid { gap: 20px !important; }
}
@media (max-width: 400px) {
    .nmst-cols-2,
    .nmst-cols-3,
    .nmst-cols-4,
    .nmst-cols-5,
    .nmst-cols-6 { grid-template-columns: 1fr !important; }
}
