/* ============================================
   FACULTY SECTION WITH FLIP ANIMATION
   ============================================ */

.faculty-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fdff 100%);
    position: relative;
    overflow: hidden;
}

.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.faculty-card {
    perspective: 1000px;
    height: 450px;
    cursor: pointer;
    position: relative;
}

.faculty-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.faculty-card.flipped .faculty-card-inner {
    transform: rotateY(180deg);
}

.faculty-front, .faculty-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
}

.faculty-front {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    display: flex;
    flex-direction: column;
}

.faculty-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: rotateY(180deg);
    padding: 30px;
    color: white;
    display: flex;
    flex-direction: column;
}

.faculty-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.faculty-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.faculty-card:hover .faculty-front .faculty-image img {
    transform: scale(1.05);
}

.experience-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    animation: badgeGlow 2s infinite;
}

.faculty-info-front {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.faculty-info-front h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--heading-color);
    font-weight: 700;
}

.faculty-role {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.faculty-qualification {
    color: #5d6d7e;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.flip-hint {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.faculty-card:hover .flip-hint {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
}

.faculty-back h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-align: center;
}

.faculty-back .faculty-role {
    text-align: center;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
}

.faculty-details {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: white;
}

.detail-section ul {
    list-style: none;
    padding: 0;
}

.detail-section li {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-section li:last-child {
    border-bottom: none;
}

.faculty-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.profile-btn, .contact-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.contact-btn {
    background: white;
    color: #667eea;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.contact-btn:hover {
    background: var(--accent-light);
    color: white;
    transform: translateY(-3px);
}

.back-hint {
    margin-top: 15px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.back-hint:hover {
    color: white;
    gap: 12px;
}

.view-all-faculty {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.view-all-faculty .btn {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.view-all-faculty .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}