/* New Teacher Card */
.new-teacher-card {
    position: relative;
    height: 480px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.new-teacher-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.new-teacher-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.new-teacher-card:hover .new-teacher-card-bg {
    transform: scale(1.1);
}

.new-teacher-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    z-index: 1;
    transition: all 0.5s ease;
}

.new-teacher-card:hover::before {
    background: linear-gradient(to top, rgba(31, 143, 255, 0.9) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
}

.new-teacher-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
    pointer-events: none;
}

.new-teacher-card:hover .new-teacher-card-glow {
    opacity: 1;
}

.new-teacher-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 3;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.new-teacher-card-category {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease 0.1s;
}

.new-teacher-card-name {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.new-teacher-card-bio {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease 0.2s;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.new-teacher-card:hover .new-teacher-card-category,
.new-teacher-card:hover .new-teacher-card-bio {
    opacity: 1;
    transform: translateY(0);
}

/* Teachers Hero Section */
.teachers-hero-section {
    position: relative;
    padding: 180px 0 100px;
    overflow: hidden;
    background: #0D0D0D;
}

.teachers-magic-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Teachers Hero Content */
.hero-content-teachers {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-title-teachers {
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-title-teachers .typewriter-text {
    display: inline-block;
    color: white;
    font-family: inherit;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    position: relative;
    width: auto;
    border-right: 4px solid white;
    animation: blink-caret 0.75s step-end infinite;
}

.hero-title-teachers .typewriter-text::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 0;
    height: 100%;
    width: 4px;
    background: white;
    animation: blink-caret 0.75s step-end infinite;
}

/* Specific class to stop blinking after typing is complete */
.hero-title-teachers .typewriter-text.typing-complete::after {
    display: none;
    /* Hide cursor */
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: white;
    }
}

.hero-subtitle-teachers {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 600px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
}

/* Teachers Hero Stats */
.hero-stats-teachers {
    display: flex;
    gap: 1.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 2s forwards;
    flex-wrap: wrap;
}

.hero-stats-teachers .stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.12);
    padding: 16px 28px;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px) brightness(1.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    flex: 1;
    min-width: 220px;
    z-index: 5;
}

.hero-stats-teachers .stat-item.stat-1 {
    animation: float 6s ease-in-out infinite;
}

.hero-stats-teachers .stat-item.stat-2 {
    animation: float 7s ease-in-out infinite 0.5s;
}

.hero-stats-teachers .stat-item.stat-3 {
    animation: float 8s ease-in-out infinite 1s;
}

.hero-stats-teachers .stat-item:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(31, 143, 255, 0.08);
    border-color: rgba(31, 143, 255, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(31, 143, 255, 0.2);
}

.hero-stats-teachers .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

/* Stat 1 - Blue theme */
.hero-stats-teachers .stat-1 .stat-icon {
    background: linear-gradient(135deg, rgba(31, 143, 255, 0.9), rgba(31, 143, 255, 0.4));
    color: #FFFFFF;
    border: 1.5px solid rgba(31, 143, 255, 0.9);
    box-shadow: 0 0 20px rgba(31, 143, 255, 0.4), inset 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Stat 2 - Gold theme */
.hero-stats-teachers .stat-2 .stat-icon {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 215, 0, 0.4));
    color: #FFFFFF;
    border: 1.5px solid rgba(255, 215, 0, 0.9);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), inset 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Stat 3 - Cyan theme */
.hero-stats-teachers .stat-3 .stat-icon {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.9), rgba(0, 240, 255, 0.4));
    color: #FFFFFF;
    border: 1.5px solid rgba(0, 240, 255, 0.9);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), inset 0 0 12px rgba(255, 255, 255, 0.4);
}

.hero-stats-teachers .stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.hero-stats-teachers .stat-1:hover .stat-icon {
    box-shadow: 0 0 15px rgba(31, 143, 255, 0.4), inset 0 0 10px rgba(31, 143, 255, 0.2);
    border-color: rgba(31, 143, 255, 0.6);
}

.hero-stats-teachers .stat-2:hover .stat-icon {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), inset 0 0 10px rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.6);
}

.hero-stats-teachers .stat-3:hover .stat-icon {
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4), inset 0 0 10px rgba(0, 240, 255, 0.2);
    border-color: rgba(0, 240, 255, 0.6);
}

.hero-stats-teachers .stat-icon i {
    animation: iconPulse 3s infinite;
}

.hero-stats-teachers .stat-content {
    display: flex;
    flex-direction: column;
}

.hero-stats-teachers .stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: #FFFFFF !important;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-stats-teachers .stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Teacher Avatar Showcase */
.teacher-avatar-showcase {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.avatar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(31, 143, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.ring-outer {
    width: 450px;
    height: 450px;
    animation: rotate 20s linear infinite;
}

.ring-middle {
    width: 350px;
    height: 350px;
    animation: rotate 15s linear infinite reverse;
}

.ring-inner {
    width: 250px;
    height: 250px;
    animation: rotate 10s linear infinite;
}

.main-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    position: relative;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 50px rgba(31, 143, 255, 0.3);
    animation: mainAvatarPulse 4s ease-in-out infinite;
}

.main-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 143, 255, 0.4) 0%, transparent 70%);
    z-index: -1;
    animation: glowPulse 2s ease-in-out infinite;
}

/* Mini Avatars */
.mini-avatar {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 5;
    animation: float 6s ease-in-out infinite;
}

.mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.avatar-2 {
    top: 20%;
    right: 5%;
    animation-delay: 1s;
}

.avatar-3 {
    bottom: 15%;
    left: 5%;
    animation-delay: 2s;
}

.avatar-4 {
    bottom: 10%;
    right: 15%;
    animation-delay: 3s;
}

.avatar-5 {
    top: 50%;
    right: -10%;
    animation-delay: 4s;
}

/* Floating Academic Icons - Glassmorphism style */
.floating-academic-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F8FFF;
    font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1;
    animation: float 8s ease-in-out infinite;
}

.icon-1 {
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.icon-2 {
    top: 25%;
    left: 40%;
    animation-delay: 1s;
}

.icon-3 {
    top: 10%;
    left: 70%;
    animation-delay: 2s;
}

.icon-4 {
    bottom: 20%;
    left: 15%;
    animation-delay: 3.5s;
}

.icon-5 {
    bottom: 15%;
    left: 45%;
    animation-delay: 1.5s;
}

.icon-6 {
    top: 40%;
    right: 5%;
    animation-delay: 2.5s;
}

.icon-7 {
    bottom: 30%;
    right: 10%;
    animation-delay: 0.5s;
}

.icon-8 {
    top: 60%;
    left: 2%;
    animation-delay: 1.2s;
}

/* Existing and New Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes mainAvatarPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 50px rgba(31, 143, 255, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 70px rgba(31, 143, 255, 0.5);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Responsive Design for Teachers Page */
@media (max-width: 991px) {
    .teachers-hero-section {
        padding: 140px 0 80px;
        text-align: center;
    }

    .hero-content-teachers {
        margin: 0 auto;
    }

    .hero-title-teachers .typewriter-text {
        border-right: none;
    }

    .hero-stats-teachers {
        justify-content: center;
        gap: 1rem;
    }

    .hero-stats-teachers .stat-item {
        width: 100%;
        max-width: 280px;
        flex: none;
    }

    .teacher-avatar-showcase {
        height: 400px;
        margin-top: 50px;
    }
}

@media (max-width: 576px) {
    .teachers-hero-section {
        padding: 120px 0 60px;
    }

    .hero-title-teachers {
        font-size: 2.2rem;
    }

    .hero-subtitle-teachers {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }

    .hero-stats-teachers {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .hero-stats-teachers .stat-item {
        max-width: 100%;
        width: 100%;
    }

    .teacher-avatar-showcase {
        height: 300px;
        display: none;
        /* Hide complex visual on very small mobile for focus */
    }

    .hero-visual {
        display: none;
    }
}